Spring 5 Reactor Netty日志垃圾邮件(太冗长)

时间:2017-10-26 21:01:28

标签: spring logging netty spring-webflux

有没有办法减少Spring 5 + Reactor + Netty中的控制台/日志噪音输出。它太冗长了,尤其是请求中的完整打印:

Request printout

1 个答案:

答案 0 :(得分:3)

这对我有所帮助:

<强>的pom.xml

<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
    <version>1.2.3</version>
</dependency>

<强>的src /主/资源/ logback.xml

<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.sssXXX, UTC} [%thread] %-5level %logger{15} - %msg%n</pattern>
        </encoder>
    </appender>
    <root level="info">
        <appender-ref ref="STDOUT" />
    </root>
</configuration>