log4j 控制台不输出,jar包也有,就是启动项目,应该输出在控制台的日志信息根本就没输出出来!
log4j.properties代码:log4j.rootCategory=debug,console,logfile,errfilelog4j.appender.con...
log4j.properties代码:
log4j.rootCategory=debug ,console ,logfile, errfile
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[myMail]%d %p %t %c - %m%n
#
# logfile
#
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.Append=false
log4j.appender.logfile.File=i18n-tools.log
log4j.appender.logfile.MaxFileSize=1MB
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
#
# errfile
#
log4j.appender.errfile=org.apache.log4j.RollingFileAppender
log4j.appender.errfile.threshold=ERROR
log4j.appender.errfile.Append=false
log4j.appender.errfile.File=i18n-tools-err.log
log4j.appender.errfile.MaxFileSize=1MB
log4j.appender.errfile.layout=org.apache.log4j.PatternLayout
log4j.appender.errfile.layout.ConversionPattern=%d %p [%c] - %m%n 展开
log4j.rootCategory=debug ,console ,logfile, errfile
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[myMail]%d %p %t %c - %m%n
#
# logfile
#
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.Append=false
log4j.appender.logfile.File=i18n-tools.log
log4j.appender.logfile.MaxFileSize=1MB
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n
#
# errfile
#
log4j.appender.errfile=org.apache.log4j.RollingFileAppender
log4j.appender.errfile.threshold=ERROR
log4j.appender.errfile.Append=false
log4j.appender.errfile.File=i18n-tools-err.log
log4j.appender.errfile.MaxFileSize=1MB
log4j.appender.errfile.layout=org.apache.log4j.PatternLayout
log4j.appender.errfile.layout.ConversionPattern=%d %p [%c] - %m%n 展开
3个回答
展开全部
看看tomcat启动的时候log4j是否初始化成功
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
测试配置文件有没有被正确加载
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询