
Ceki Gulcu wrote:
Joern Huxhorn wrote:
I disagree. I just implemented an enhanced version of the log4j NDC myself as you suggested on the SLF4J mailinglist. It's implemented quite similar to the logback MDC but isn't serialized/used by any standard appender. My multiplex-appenders, on the other hand, *are* evaluating it, thus adding an additional data point to the LoggingEvent. Wouldn't a similar extension be possible in Ralphs case?
How can multiplex-appenders access a field which does not exist in c.q.l.classic.spi.LoggingEvent? They are using de.huxhorn.lilith.data.logging.LoggingEvent which contains a field for NDC values. The conversion between c.q.l.classic.spi.LoggingEvent and Lilith LoggingEvent is done in /trunk/logback/logging-adapter in the de.huxhorn.lilith.data.logging.logback.LogbackLoggingAdapter class.
That conversion is also evaluating the NDC by executing if(!NDC.isEmpty()) { result.setNdc(NDC.getContextStack()); } Joern.