In my spring-boot project I am using Logback-"Mapped Diagnostic Context" MDC for logging diagnostic context.
MDC-data is not logged (to console or file) by default.
Is there a way for getting this MDC logs into the output-log, using only application properties?
spring-boot provides some application properties for this. Have a look at common-application-properties.html.
You can find logging.pattern.level here. By setting
logging.pattern.level=%5p %mdc
data from MDC will be logged, too.
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