Etc/Etc

Log4j.properties를 이용한 로그 파일생성

밍꿔 2020. 3. 31. 11:51


반응형

 

 

# Log4j Setting file

# Appender - Console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%d{HH:mm:ss.SSS}] [%-5p] [%c] %m%n

# Logger - APP
log4j.logger.com.diquest=DEBUG

# Logger - ROOT
log4j.rootLogger=INFO, console, file 

# Logger - FILE
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Threshold=INFO
log4j.appender.file.File= --------/src/main/webapp/WEB-INF/view/logTest.log
log4j.appender.file.Append=true
log4j.appender.file.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=[%p], %d{yyyy-MM-dd HH:mm:ss}, %m %n
log4j.appender.file.encoding=EUC-KR

 

 

*결과

 

 

 

반응형

'Etc > Etc' 카테고리의 다른 글

[Tomcat] MaxPostSize, MaxParameterCount  (0) 2022.12.14
Web Server 와 WAS의 차이  (0) 2020.04.09
#Git #GitFlow  (0) 2019.12.24