您的位置:首页 > 运维架构

一个log4j.properties配置(每天一个日志文件)

2012-11-28 17:27 597 查看
log4j.rootCategory=WARN,stdout, hd

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=<%d> %5p (%F:%L) [%t] (%c) - %m%n

#  DEBUG  INFO WARN ERROR FATAL
log4j.appender.hd=org.apache.log4j.DailyRollingFileAppender
log4j.appender.hd.File=HelpDesk.log
log4j.appender.hd.Append=true
log4j.appender.hd.Threshold=INFO
log4j.appender.hd.layout=org.apache.log4j.PatternLayout
log4j.appender.hd.layout.ConversionPattern=<%d> %p (%F:%L) [%t] %c - %m%n

# If programmed properly the most messages would be at DEBUG
# and the least at FATAL.
log4j.logger.org.apache=FATAL

# Control logging for Jakarta packages classes
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.hd=WARN
log4j.logger.org.apache.struts=WARN

# Don't show debug logs for Cactus
log4j.category.org.apache.cactus=WARN
log4j.category.org.apache.commons.httpclient=WARN
log4j.category.httpclient=WARN

# All hibernate log output of "info" level or higher goes to stdout.
# For more verbose logging, change the "info" to "debug" on the last line.
log4j.logger.org.rd=DEBUG
log4j.logger.net.sf.hibernate=INFO
log4j.logger.org.quartz=INFO
log4j.logger.org.springframework=ERROR
log4j.logger.com.hollycrm.ecallcenter.framework.dbaccesslog=INFO
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: