25 lines
1.0 KiB
Properties
25 lines
1.0 KiB
Properties
#### Use two appenders, one to log to console, another to log to a file
|
|
log4j.rootCategory= R
|
|
|
|
#### Second appender writes to a file
|
|
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
|
log4j.appender.stdout.Threshold=trace
|
|
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
|
log4j.appender.stdout.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %p %t %c - %m%n
|
|
|
|
log4j.logger.AnalysisLogger=TRACE,AR
|
|
log4j.appender.AR=org.apache.log4j.RollingFileAppender
|
|
log4j.appender.AR.Threshold=trace
|
|
log4j.appender.AR.File=./Analysis.log
|
|
log4j.appender.AR.MaxFileSize=50000KB
|
|
log4j.appender.AR.MaxBackupIndex=2
|
|
log4j.appender.AR.layout=org.apache.log4j.PatternLayout
|
|
log4j.appender.AR.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %p %t %c - %m%n
|
|
|
|
#### Third appender writes to a file
|
|
log4j.logger.org.hibernate=H
|
|
log4j.appender.H=org.apache.log4j.AsyncAppender
|
|
log4j.appender.H.Threshold=OFF
|
|
log4j.appender.H.layout=org.apache.log4j.PatternLayout
|
|
log4j.appender.H.layout.ConversionPattern=%d{dd/MM/yyyy HH:mm:ss} %p %t %c - %m%n
|