我的catalina日志充满了陈述的GOB,例如:

/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]

永远和永远。

我在Tomcat和Apache中搜索了每个配置文件,以搜索据称打开此内容的语句:

http://hc.apache.org/httpclient-3.x/logging.html

而且我看不到启用此记录的位置。我部署的其他.WAR可以做到这一点。应用程序中的Log4J配置块不执行。

我还试图用这样的陈述将其关闭:

org.apache.commons.httpclient.wire=SEVERE

或者

org.apache.commons.httpclient.wire.content=SEVERE

或者

httpclient.wire.content=SEVERE

在我的tomcat/conf/logging.properties文件中,这并没有停止

我正在使用S3库来用于可能是这些来源的圣杯。但是,当我在开发计算机上运行此应用程序(在开发和部署配置中)时,我没有看到它。

还有一个相关的问题:我什么时候要使用这些“电线日志”?

有帮助吗?

解决方案

您的tomcat common/lib中是否还有其他伐木库? (即SLF4J,LogBack,Log4J等)

如果是,您可能还需要配置相应的记录配置文件。

其他提示

对于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>

并将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>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top