log4j.logger.com.sample=DEBUG, sample
log4j.appender.sample.File=${user.dir}/sample/logs/sample.log
log4j.appender.sample.MaxFileSize=10MB
log4j.appender.sample.MaxBackupIndex=10
log4j.appender.sample.Append=false
log4j.appender.sample=org.apache.log4j.RollingFileAppender
log4j.appender.sample.layout=org.apache.log4j.PatternLayout
log4j.appender.sample.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c - %m%n
Now, the log messages will redirect to the location ${user.dir}/sample/logs/sample.log.
No comments:
Post a Comment