2

Sometimes I've got third party libraries logging entries at incorrect levels. I'd like to be able to correct this.

I know I can do something along the lines of this

   <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
        <evaluator class="ch.qos.logback.classic.boolex.JaninoEventEvaluator">
            <expression>return logger.equals("reactor.core.publisher.Operators") &amp;&amp;
                throwable instanceof software.amazon.awssdk.services.dynamodb.model.TransactionCanceledException;</expression>
        </evaluator>
        <OnMismatch>NEUTRAL</OnMismatch>
        <OnMatch>DENY</OnMatch>
    </filter>

In order to eliminate the log. But I want to be able to remap them. eg. change ERRORs into WARNINGs for specific classes.

https://docs.spring.io/spring-boot/docs/1.1.12.RELEASE/api/org/springframework/boot/logging/logback/LevelRemappingAppender.html was also something that used to exist but it doesn't seem to be around in the 2.x release of Spring Boot.

Ren
  • 3,395
  • 2
  • 27
  • 46

0 Answers0