Springboot项目关闭Httpclient的Debug日志


今天在做httpclient测试时,发现控制台打印了好多请求相关的信息,如何去掉这些不打印?

 

(2)在配置文件包下加入logback.xml文件,文件内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!-- definition of appender STDOUT -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
</encoder>
</appender>

<root level="ERROR">
<!-- appender referenced after it is defined -->
<appender-ref ref="STDOUT"/>
</root>
</configuration>
(3)文件位置

 

(4)再次测试,发现就没有那些日志了

 

解决问题原链接:https://blog.csdn.net/evanxuhe/article/details/79488672

原文链接:https://blog.csdn.net/sunnyzyq/article/details/89457805

posted on 2019-09-26 11:00  木西-Muxy  阅读(2985)  评论(0编辑  收藏  举报

导航