浏览 956 次
锁定老帖子 主题:Logger
该帖已经被评为隐藏帖
|
|
---|---|
作者 | 正文 |
发表时间:2008-08-13
log4j.rootLogger = DEBUG, Console, LogFile, ErrorFile # Output the log info to the Java Console # log4j.appender.Console = org.apache.log4j.ConsoleAppender log4j.appender.Console.Target = System.out log4j.appender.Console.ImmediateFlush = true log4j.appender.Console.Threshold = DEBUG log4j.appender.Console.layout = org.apache.log4j.PatternLayout log4j.appender.Console.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n # Save the log info to the log file # log4j.appender.LogFile = org.apache.log4j.RollingFileAppender log4j.appender.LogFile.File = logs/log.log log4j.appender.LogFile.Append = true log4j.appender.LogFile.ImmediateFlush = false log4j.appender.LogFile.MaxFileSize = 8MB log4j.appender.LogFile.MaxBackupIndex = 256 log4j.appender.LogFile.Threshold = INFO log4j.appender.LogFile.layout = org.apache.log4j.PatternLayout log4j.appender.LogFile.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n # Save the error info to the error file. A file one day. # log4j.appender.ErrorFile = org.apache.log4j.DailyRollingFileAppender log4j.appender.ErrorFile.File = logs/error.log log4j.appender.ErrorFile.Append = true log4j.appender.ErrorFile.ImmediateFlush = false log4j.appender.ErrorFile.Threshold = ERROR log4j.appender.ErrorFile.layout = org.apache.log4j.PatternLayout log4j.appender.ErrorFile.layout.ConversionPattern = <%-d{yyyy-MM-dd HH:mm:ss}> <%t> %l %n<%p> %m%n%n 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |