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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM