log4j.properties

log4j.rootLogger=INFO,A1,A2

# \u8f93\u51fa\u5230\u63a7\u5236\u53f0
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [\u4fe1\u606f] %m%n

 

# \u8f93\u51fa\u5230\u65e5\u5fd7\u6587\u4ef6
log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.File=${catalina.home}/webapps/strutsLog/logging.log
log4j.appender.A2.Append=true
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [\u4fe1\u606f] %m%n

你可能感兴趣的:(apache,log4j)