logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Borovac <Stefan.Boro...@t-online.de>
Subject PatternLayout + MDC Problem
Date Wed, 08 Oct 2008 19:41:18 GMT
Hi All,

I'am currently working on a simple service which connects the
XMLSocketReceiver with a DBAppender.

I'am using the latest SNAPSHOTs from either log4j, log4j-components,
and log4j-receiver.

To test the service, I connect a ConsoleAppender to a logger to track
the transmitted packages. The ConsoleAppender is staffed with a
PatternLayout having a ConversionPattern such that the MDC should be

But the instead of the MDC being printed I end up with a NPE. This is
caused in the MDCPatternConverter which should be initialised with a
key being used later to extract values from the MDC hash. But this key
is null, causing the hash function to crash throwing a NPE.

A similar setup should work in Chainsaw. Hence I assume there will be a
solution for something selfmade (or am I a bit to optimistic).

Any help or guess is welcome. I honestly don't want to crawl through the
Chainsaw code.


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message