解决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..v20130312</version>
</plugin>
加入日志配置文件:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1..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说明!