2015-09-29 18:13:14 +02:00
|
|
|
#### Use two appenders, one to log to console, another to log to a file
|
2017-09-07 12:03:22 +02:00
|
|
|
log4j.rootCategory= R
|
2015-09-29 18:13:14 +02:00
|
|
|
|
|
|
|
#### Second appender writes to a file
|
2017-09-07 12:03:22 +02:00
|
|
|
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
|
2015-09-29 18:13:14 +02:00
|
|
|
|
|
|
|
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
|