Logs are filling up with httpclient.wire.content dumps. How can I turn it off?

梦想与她 提交于 2019-12-03 15:10:02

Do you have any additional logging library in your Tomcat common/lib? (i.e SLF4J, Logback, Log4J, etc)

If yes, you may want to configure the respective logging configuration file as well.

Renaud

For 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>

And put logback.xml in your classpath with the content below:

<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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!