logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Rourke, Brian" <borou...@walkerinfo.com>
Subject MDC & renderer question
Date Thu, 04 Nov 2004 21:04:37 GMT
Hello,

I have a question about MDC & ObjectRenderers.

There are various places in my application where I log certain pertinent
information of a class of mine called "DataNode", so I created an
ObjectRenderer class that writes all specific DataNode details to a log.

More recently I found occasion in a few specific places to include
DataNode details inline with other log information on a per-thread
basis. I thought MDC would be perfect for this.

Unfortunately, it seems (using PatternLayout) that %X{dataNode} only
outputs dataNode.toString() rather than using doRender( dataNode ). Is
this by design? Is there any built-in way to log MDC-mapped objects with
renderer classes?

Thanks,
Brian O'Rourke

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message