开发者社区> 问答> 正文

LOG4j在配置启动TOMCAT错误??

<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

contextConfigLocation
classpath:com/arvato/resource/applicationContext.xml


log4jConfigLocation
log4j.properties
<listener>
    <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
    <servlet-name>user</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

</servlet>
<servlet-mapping>
    <servlet-name>user</servlet-name>
    <url-pattern>*.do</url-pattern>
</servlet-mapping>

按照网上配置都配了 还是报错 下面是报错信息,WARN 警告实在不知道怎么解决了 跪求高手解决,谢谢!没有悬赏币了,对不住
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.

展开
收起
小旋风柴进 2016-03-03 11:48:43 2489 0
1 条回答
写回答
取消 提交回答
  • No appenders could be found.
    log4j得有appender来指定输出内容和格式,你的log4j没有找到这个配置文件,所以报错。

    2019-07-17 18:51:10
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Python第四讲——使用IPython/Jupyter Notebook与日志服务玩转超大规模数据分析与可视化 立即下载
大规模日志数据平台架构面临的问题与挑战 立即下载
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载