Tocat 下的日志配置参考代码

代码如下:

#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

相关推荐