首页 > 代码库 > Log4J简单配置
Log4J简单配置
### set log levels ### log4j.rootLogger= INFO, Console, File, Error ### Console appender definition ### log4j.appender.Console=org.apache.log4j.ConsoleAppender log4j.appender.Console.Target=System.out log4j.appender.Console.layout=org.apache.log4j.PatternLayout log4j.appender.Console.layout.ConversionPattern=%d %p [%c] %m%n ###### File appender definition ####### log4j.appender.File = org.apache.log4j.DailyRollingFileAppender log4j.appender.File.File = ${catalina.home}/logs/projectName/log.log log4j.appender.File.Append = true log4j.appender.File.Threshold = INFO log4j.appender.File.layout = org.apache.log4j.PatternLayout log4j.appender.File.layout.ConversionPattern=%d %p [%c] %m%n ###### Error appender definition ####### log4j.appender.Error = org.apache.log4j.DailyRollingFileAppender log4j.appender.Error.File = ${catalina.home}/logs/projectName/error.log log4j.appender.Error.Append = true log4j.appender.Error.Threshold = ERROR log4j.appender.Error.layout = org.apache.log4j.PatternLayout log4j.appender.Error.layout.ConversionPattern = %d %p [%c] %m%n
Log4J简单配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。