7 java apache tomcat log4j catalina
我的catalina日志充满了大量的陈述,如:
/logs/catalina.out:2010-05-05 02:57:19,611 [Thread-19] DEBUG httpclient.wire.content - >> "[0x4]
[0xc][0xd9][0xf4][0xa2]MA[0xed][0xc2][0x93][0x1b][0x15][0xfe],[0xe]h[0xb0][0x1f][0xff][0xd6][0xfb]
[0x8f]O[0xd4][0xc4]0[0xab][0x80][0xe8][0xe4][0xf2][\r]I&[0xaa][0xd2]BQ[0xdb](zq[0xcd]ac[0xa8]
Run Code Online (Sandbox Code Playgroud)
永远地.
我搜索了tomcat和apache中的每个配置文件,以查找据称如下所述启用它的语句:
http://hc.apache.org/httpclient-3.x/logging.html
我没有看到此日志记录已启用的位置.没有其他.war我部署了这个.应用程序中的log4j配置块没有这样做.
我还尝试用这样的语句将其关闭:
org.apache.commons.httpclient.wire=SEVERE
Run Code Online (Sandbox Code Playgroud)
要么
org.apache.commons.httpclient.wire.content=SEVERE
Run Code Online (Sandbox Code Playgroud)
要么
httpclient.wire.content=SEVERE
Run Code Online (Sandbox Code Playgroud)
在我的tomcat/conf/logging.properties文件中,并没有阻止它
我正在使用S3库来获取可能是这些的源代码的grails.但是当我在我的开发机器上运行这个应用程序时(在开发和部署配置中),我没有看到它.
还有一个相关的问题:我什么时候想要使用这些"电线日志?"
对于Slf4J:
<dependencies>
<!-- LOGGING -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.5.9-RC0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.17</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.9-RC0</version>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
并将logback.xml放在类路径中,其中包含以下内容:
<configuration>
<!-- LOGBACK logging config file, see http://logback.qos.ch/manual/joran.html -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<!-- http://logback.qos.ch/manual/layouts.html#ClassicPatternLayout -->
<Pattern>%-5level %msg [%logger{16} %d{HH:mm:ss}]%n</Pattern>
</layout>
</appender>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
<logger name="org.apache" level="WARN" />
<logger name="org.apache.axis2" level="WARN" />
<logger name="org.apache.axiom" level="WARN" />
<logger name="httpclient.wire" level="WARN" />
</configuration>
Run Code Online (Sandbox Code Playgroud)