我在web.xml中设置了一个自定义的log4jConfigLocation位置 <!--Log4J配置--><context-param><param-name>webAppRootKey</param-name><param-value>DPCM.root</param-value></context-param><context-param> <param-name>log4jConfigLocation</param-name> <param-value>classpath:conf/log/log4j.xml</param-value></context-param><context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value></context-param><listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class></listener>在Intellij IDEA 中运行 使用war exploded 模式 也就是 使用文件夹方式部署,可以正常启动, 而使用war方式部署,会得到错误提示log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
添加回答
举报
0/150
提交
取消