You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior hello world Console log lines with the content of the MDC.
Additional context
It works if I use Logback.
If I remove LoggingMDCFilter from the filters chain, it works with log4j2, of course, but I'm not sure this is a very good idea.
The text was updated successfully, but these errors were encountered:
@brisssou For the most part Finatra is meant to work with SLF4J-API logging implementation and the MDC initialization is really only tested to work with SLF4J-API implementations.
Log4J2 is an entirely different logging subsystem, so it's not expected that the MDC integration will work out of the box with Log4J2. You may need to write your own adaptor for the MDC to propagate across Locals in Finagle if you use Log4J2.
Describe the bug
I cannot output MDC content in logs if the log backend is
log4j2
.To Reproduce
With
log4j2.xml
:Expected behavior
hello world
Console log lines with the content of the MDC.Additional context
It works if I use
Logback
.If I remove
LoggingMDCFilter
from the filters chain, it works withlog4j2
, of course, but I'm not sure this is a very good idea.The text was updated successfully, but these errors were encountered: