在tomcat中用log4j配置日志系统:
a)
第一步:下载log4j.jar,并把log4j.jar放入$CATALINA_HOME/common/lib.
第二步:写配置文件log4j.properties:
log4j.properties
#log4j.rootLogger=warn, A1,warnlog
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
#log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4
a)
第一步:下载log4j.jar,并把log4j.jar放入$CATALINA_HOME/common/lib.
第二步:写配置文件log4j.properties:
log4j.properties
#log4j.rootLogger=warn, A1,warnlog
#log4j.appender.A1=org.apache.log4j.ConsoleAppender
#log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
#log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
log4