Yoav,
That would certainly work, but it will force developers to make an additional call before each logging call (to set the MDC value). Also, as I understand MDC, it is intended for values remaining relatively constant across interleaved logging calls in a given thread. The value of MDC (as you of course know) is its values are retained across calls on a given thread and child threads. My group is facing similar questions, and I'm somewhat torn on which approach to take. We have values foreign to Log4j we want to get into the log but they change on every logging call. I wasn't too thrilled attacking such requirements with MDC ... although admittedly it will certainly work. Mike -----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:14 AM To: Log4J Users List; Jean-Michel Auguste Subject: RE: New Pattern Layout Howdy, Would using an MDC with %X{severityNumber} do the trick for you? You wouldn't have to extend any classes then. Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Jean-Michel Auguste [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, February 18, 2003 9:48 AM >To: [EMAIL PROTECTED] >Subject: New Pattern Layout > >Hi, >I'm managing to add a new pattern layout (%s) in order to add a severity >number associated to the level of the message. >For instance, when a logging message of level INFO is appended, I would >like the severity set to 4, when a logging message of level FATAL >is appended, I want a number 1 for severity. >Which Log4J classes should I extend to accomplish that ? >Any sample would be appreciated > >Thanks for your help This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------- This message and any included attachments are from Siemens Medical Solutions Health Services Corporation and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]