posted 22 years ago
Great idea...although I'm not sure I know how to do it.
I love log4j, I just wish there was a little more documentation. I've included a log config that I use, which writes all output to both the console and a log file. Maybe you can use this to get started.
I would really like to see your solution on this.
log4j.rootLogger=info, logfile, console
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c - %m%n
log4j.logger.com.mycompany=INFO
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=logs/myapp.log
log4j.appender.logfile.MaxFileSize=1000KB
# Number of backups to keep
log4j.appender.logfile.MaxBackupIndex=60
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%p %t %c - %m%n
[ July 26, 2002: Message edited by: Chris Reeves ]
[ July 26, 2002: Message edited by: Chris Reeves ]
[ July 26, 2002: Message edited by: Chris Reeves ]