Janusz, The answer is in the log4j/helpers/PatternParser.java code (used by PatternLayout.java). %x is for NDC. %X is for MDC. You will probably want to specify the particular MDC key, and that would be like this:
%X{<key name>} Try it and see if it works for you. -Mark [Ceki, I think the PatternLayout javadoc needs to be updated to include this new conversion pattern.] -----Original Message----- From: Janusz Dalecki [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 4:16 PM To: [EMAIL PROTECTED] Subject: MDC layout parameter Hi, I would like MDC to print my sub-system name (my sub-system is separate app running under jvm). I am using log4j 1.2 beata. I am trying to use MDC because if I understand properly all children threads of the main thread will use the same context value, and that is exactly what I want. I can't get that to work - I am using in my PatternLayout %x flag to do that - is that the reason it does not work. I was trying to look inside a code, but can't find anything. Janusz -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>