Hi,

 How can I use the MDC context with the AsyncAppender? The code below
always makes the MDC come out empty, which I understand why.
I need to use the AsyncAppenders and I also want to use the MDC and the %X
since I don't want to make a code change everytime I add a new variable to
log.

MDC.put("user_id", "joe");
MDC.put("trans_id, "123);

cat.info("User information..");


the Category is set up to use an AsyncAppender with CONSOLE and FILE
appenders as well. Each one has the %X{user_id} %X{trans_id} in the
patternlayout and they are coming out empty.

If I change the category to NOT use the Async, then everything works fine.

Thanks,
  - Tim
____________________________________________________
Timothy G. Mullé
Senior Software Architect
Reuters Valley Forge Solutions Center
1000 Madison Avenue
Norristown, PA 19403-2432

Phone: (610) 650-8600 x8340
Fax:      (610) 650-8170


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to