본문 바로가기
IT/Web

log4j.properties 정리

by 최고영회 2013. 12. 21.
728x90
반응형
SMALL
log4j.rootLogger = INFO, stdout, logfile, dailyfile

# Consol  
log4j.appender.stdout = org.apache.log4j.ConsoleAppender  
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout  
log4j.appender.stdout.layout.ConversionPattern = %5p [%t] - %m%n  
log4j.logger.org.springframework = ERROR  
log4j.logger.org.apache = INFO  
log4j.logger.java.sql = DEBUG 


### File ###
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=${catalina.home}/logs/testLog.log
log4j.appender.logfile.Append=true
log4j.appender.logfile.MaxFileSize=1024KB
log4j.appender.logfile.MaxBackupIndex=100
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%5p [%t] - %m%n

### File to Daily ###
log4j.appender.dailyfile.Threshold = DEBUG
log4j.appender.dailyfile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.dailyfile.File=${catalina.home}/logs/test/testLog_daily.log 
log4j.appender.dailyfile.layout=org.apache.log4j.PatternLayout
log4j.appender.dailyfile.layout.ConversionPattern= %5p [%t] - %m%n
log4j.appender.dailyfile.DatePattern='.'yyyy-MM-dd


728x90
반응형
LIST