码迷,mamicode.com
首页 > 其他好文 > 详细

解决Jetty Maven Plugin:Please initialize the log4j system properly(转)

时间:2014-12-08 17:15:09      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   color   sp   on   文件   

解决Jetty Maven Plugin:Please initialize the log4j system properly.
Jetty Maven Plugin环境:

<plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.10.v20130312</version>
</plugin>

 

加入日志配置文件:

<plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>8.1.10.v20130312</version>
        <configuration>
              <systemProperties>
                    <systemProperty>
                      <name>log4j.configuration</name>
                      <value>file:/${jetty.home}/resources/log4j.properties</value>
                    </systemProperty>
              </systemProperties>
        </configuration>
</plugin>

完成后这个错误消失!!
 
补充:但系统还是不会打出我们想要的INFO日志,仔细发现这里还有一个问题:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation

这个问题解决方案将在http://jerval.iteye.com/blog/1872787说明!

 

http://blog.csdn.net/jerval/article/details/8966990

 

解决Jetty Maven Plugin:Please initialize the log4j system properly(转)

标签:style   blog   http   io   ar   color   sp   on   文件   

原文地址:http://www.cnblogs.com/softidea/p/4151378.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!