【SpringBoot】关闭HttpClient无用日志

环境:

SpringBoot

pom依赖了apache.commons.HttpClient:



    commons-httpclient
    commons-httpclient
    3.1

问题:

调用httpClient时会输出一堆相关的debug日志。

解决:

官方提供了log4j、Commons Logging、java.util.logging三种日志关闭的方法,但是没有提供SLF4J日志的关闭方法,方法如下:

在classpath下(resources目录下)建立一个logback.xml,内容如下:



    
    

转载于:https://www.cnblogs.com/puyangsky/p/7404945.html

你可能感兴趣的:(【SpringBoot】关闭HttpClient无用日志)