I agree we need support for this sort of cross-thread context information....properties which are inheritable through the logger hierarchy may fit the bill..I haven't looked into implementation details, but here's an example:
If you got the "org.apache.log4j" logger and called 'setProperty("someprop", "someval"), then all loggers under org.apache.log4j would also have the property (you would also need support for removeProperty("someprop")). The property would be overridden if a closer ancestor set the property (if org.apache.log4j.net set the same property). Opinions dev folks? -----Original Message----- From: Thomas Muller [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 1:09 AM To: [EMAIL PROTECTED] Subject: Alternative contexts for MDC/NDC Log4j gurus, Does log4j have support for MDC/NDC across other contexts than threads? If not, is it any plans to implement this? For the time being I find my self having to prefix log messages with context sensitive information, and it doesn't really "feel" right at all. Any suggestions for a MDC/NDC framework allowing arbitrary contexts would be much appreciated, and also how to incorporate it into PatternLayout etc. -- Thomas ************************************************************************ * Copyright ERA Technology Ltd. 2003. (www.era.co.uk). All rights reserved. The information supplied in this Commercial Communication should be treated in confidence. No liability whatsoever is accepted for any loss or damage suffered as a result of accessing this message or any attachments. ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]