Thursday, September 13, 2007

Just wanted to follow-up my previous post about Log4j in PeopleCode and post the actual log4j.properties file that I used. Using this file along with the code posted previously is all you would need to get started.


log4j.rootLogger=WARN, rolling

log4j.appender.screen=org.apache.log4j.ConsoleAppender
log4j.appender.screen.layout=org.apache.log4j.PatternLayout
log4j.appender.screen.layout.ConversionPattern=%d %-4r [%t] %-5p %c %x - %m%n

log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.Threshold=DEBUG
log4j.appender.rolling.File=/some/directory/log4j.log
log4j.appender.rolling.MaxFileSize=20480KB
log4j.appender.rolling.MaxBackupIndex=5
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d %p [%c{4}] %M %m%n

No comments: