首页 > 服务器 > Web服务器 > 正文

Tocat 下的日志配置参考代码

2024-09-01 13:46:10
字体:
来源:转载
供稿:网友

复制代码 代码如下:


#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

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表