Thanks Mark,
This works fine.
How can I filter them per MDC in say Lumbermill GUI?
Janusz

fyi
Point taken, I will raise bug next time - thanks.
-----Original Message-----
From: Mark Womack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:54 PM
To: 'Log4J Users List'
Subject: RE: MDC layout parameter


fyi, I filed a bug against PatternLayout javadoc for not documenting the
%X
pattern converter.

-Mark

-----Original Message-----
From: Mark Womack 
Sent: Tuesday, March 26, 2002 5:20 PM
To: 'Log4J Users List'
Subject: RE: MDC layout parameter


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]>

--
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]>

Reply via email to