I have the following Logback/SLF4J XML configuration:
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true">
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<conversionRule conversionWord="m"
converterClass="com.mycompany.logging.MyCustomConverter" />
<conversionRule conversionWord="message"
converterClass="com.mycompany.logging.MyCustomConverter" />
<conversionRule conversionWord="msg"
converterClass="com.mycompany.logging.MyCustomConverter" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</layout>
<charset>utf8</charset>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
</configuration>
Is there an equivalent Spring Boot YML configuration?
Specifically wondering about the conversionRule
properties.
Spent some time looking for this myself -- the YML configurations stay at the generic facade level, whereas the conversionRule would be specific to logback.
Ended up just leaving the xml configuration with no level
set on the appender, controlling the level via the YML, or in my case dynamically being set as needed.