欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

Tocat 下的日志配置参考代码

程序员文章站 2022-07-09 17:32:54
复制代码 代码如下:#log out methor, console is system out to console #log4j.rootlogger=warn, co...
复制代码 代码如下:

#log out methor, console is system out to console
#log4j.rootlogger=warn, console
#log4j.rootlogger=warn
log4j.rootlogger=info,a1,r

log4j.appender.console=org.apache.log4j.consoleappender
log4j.appender.console.layout=org.apache.log4j.patternlayout
log4j.appender.console.layout.conversionpattern=(%r ms) [%t] %-5p: %c#%m %x: %m%n

#save it to log file
log4j.appender.r=org.apache.log4j.rollingfileappender

#file name
log4j.appender.r.file=webhealth_sys_log.txt
log4j.appender.r.maxfilesize=500kb
log4j.appender.r.maxbackupindex=1
#log4j.appender.r.layout=org.apache.log4j.htmllayout
log4j.appender.r.layout=org.apache.log4j.patternlayout
log4j.appender.r.layout.conversionpattern=%d{yyyy-mm-dd hh:mm:ss,sss} [%t] [%c] [%p] - %m%n


log4j.logger.com.genuitec.eclipse.sqlexplorer=debug
log4j.logger.org.apache=warn
log4j.logger.org.hibernate=warn