Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.0.13
-
None
-
Operating System: Linux
Platform: PC
JDK: 1.7
Description
If the SocketAppender is the only appender configured in logback.xml, then the mdcPropertyMap field of the LoggingEvent will be set to an empty map and no MDC will arrive on the ServerSocketReceiver side.
The problem might be that the AbstractSocketAppender uses a BlockingQueue and the logging events are processed on a different thread in which there are no mdc properties.
However if logback.xml has a ConsoleAppender and a SocketAppender, what happens is that the mdc properties are correctly set to the loggingEvent by the ConsoleAppender and when is passed to the SocketAppender, the logging event is correctly serialized and the mentioned problem does not appear.