jhannes / logevents

An easy-to-extend implementation of SLF4J with batteries included and sensible defaults
Other
42 stars 8 forks source link

PatternLogEventFormatter to support mdc-filtering #44

Closed jhannes closed 3 years ago

jhannes commented 3 years ago

Currently, it's possible to do the following

observer.console.includedMdcKeys=request

But this doesn't work if we replace the formatter with PatternLogEventFormatter:

observer.console.formatter=PatternLogEventFormatter
observer.console.formatter.pattern=%mdc %msg
observer.console.includedMdcKeys=request

It would also be nice if console observer had a shorthand to switch to PatternLogEventFormatter:

observer.console.pattern=%mdc %msg
observer.console.includedMdcKeys=request