NutzCN Logo
问答 log4j配置文件报错
发布于 2799天前 作者 qq_4cb3f8b1 2929 次浏览 复制 上一个帖子 下一个帖子
标签:

启动tomcat时报错

信息: Starting Servlet Engine: Apache Tomcat/9.0.0.M15
log4j:ERROR Could not find value for key log4j.appender.DEBUG
log4j:ERROR Could not instantiate appender named "DEBUG".
三月 24, 2017 11:32:16 上午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Shiro environment
log4j:WARN No appenders could be found for logger (org.nutz.mvc.NutFilter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

配置文件如下

log4j.rootLogger=Console,DEBUG

log4j.logger.test=warn,Console
log4j.logger.test1=warn,Console

log4j.logger.org.apache.commons.beanutils=error
log4j.logger.org.quartz.core.QuartzSchedulerThread=info
log4j.logger.org.apache.shiro.web=error
log4j.logger.net.sf.ehcache.statistics=error
log4j.logger.net.sf.ehcache=error
log4j.logger.org.apache.shiro.session=error
log4j.logger.org.apache.shiro.mgt=error
log4j.logger.org.apache.shiro.cache.ehcache=error
log4j.logger.org.apache.shiro=error

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d %l %-5p - %m%n


3 回复
log4j.rootLogger=Console,DEBUG

改成

log4j.rootLogger=debug,Console

第一行,改成:

log4j.rootLogger=DEBUG,Console

可以了,这是为啥

添加回复
请先登陆
回到顶部