log4j 推荐配置

以下为推荐的log4j日志参数设置:

log4j.appender.file=org.apache.log4j.RollingFileAppender

log4j.appender.file.File=/waslog/XXX
log4j.appender.file.layout.ConversionPattern=%d{ISO8601} [%-20.20t] %5p %-40c{1}[%-20.20M]:%5L - %m%n

log4j.appender.file.MaxFileSize=20MB

log4j.appender.file.MaxBackupIndex=10

log4j.rootLogger=debug, file

你可能感兴趣的:(log4j)