Tocat 下的日志配置参考代码
(编辑:jimmy 日期: 2024/12/23 浏览:3 次 )
复制代码 代码如下:
#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
#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
下一篇:必须要懂的win2003服务器上的asp站点安全设置