This is my first foray into the world of LogBack, however I couldn't find anywhere in the documentation where I could define an encoder/pattern once and share it among multiple appenders. Any idea how to accomplish this?
Patterns are reusable with variable substitution.
<configuration> <property name="defaultPattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" /> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${defaultPattern}</pattern> </encoder> </appender> <root level="debug"> <appender-ref ref="STDOUT" /> </root> </configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With