首页 > log4j 整合web 报错 不读取配置文件

log4j 整合web 报错 不读取配置文件

StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console

我的log4j2.xml 文件在 resource 目录的 log4j2下

我的web.xml 配置中 添加:

<!--log4j2-->
    <listener>
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
    </listener>
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:log4j/log4j2.xml</param-value>
    </context-param>
    <context-param>
        <param-name>log4jRefreshInterval</param-name>
        <param-value>60000</param-value>
    </context-param>

求助为何现在控制台报这个错误


ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

【热门文章】
【热门文章】