RE: MDC in J2EE environment

2003-04-03 Thread Ken Cline
At 04/03/2003 11:09 AM, Ceki Gülcü wrote: > > At 09:58 AM 4/3/2003 -0600, Ebersole, Steven wrote: > > Actually just another thought occurred to me. The MDC value is now a > > ContextCounter instance instead of the actual value I put there. The > > default rendering is simply to call the Object'

RE: MDC in J2EE environment

2003-04-03 Thread Ceki Gülcü
ginal Message- |From: Ceki Gülcü [mailto:[EMAIL PROTECTED] |Sent: Thursday, April 03, 2003 9:30 AM |To: Log4J Users List |Subject: Re: MDC in J2EE environment | | |Steven, | |Your question is quite intriguing. | |One solution would be to use some so

RE: MDC in J2EE environment

2003-04-03 Thread Ebersole, Steven
ng in ContextCounter to call its context.toString()? |-Original Message- |From: Ceki Gülcü [mailto:[EMAIL PROTECTED] |Sent: Thursday, April 03, 2003 9:30 AM |To: Log4J Users List |Subject: Re: MDC in J2EE environment | | |Steven, | |Your question is

RE: MDC in J2EE environment

2003-04-03 Thread Ebersole, Steven
30 AM |To: Log4J Users List |Subject: Re: MDC in J2EE environment | | |Steven, | |Your question is quite intriguing. | |One solution would be to use some sort of counting. Thus, |each time you set |a key in the MDC you would increment the count of that key

RE: MDC in J2EE environment

2003-04-03 Thread Shapira, Yoav
Howdy, >-- File XMDC.java -- >import org.apache.log4j.MDC; > >public class XMDC { Should this be public class XMDC extends MDC { ... ? I like your suggestion! Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confi

RE: MDC in J2EE environment

2003-04-03 Thread Shapira, Yoav
Howdy, >The rub with this approach is that the MDC for a certain key might be set >when it should be empty. You are of course correct. I noticed this a while ago after using MDC for a while. However, I actually don't mind it at all as it provides insight into the execution path at a cheaper pr

RE: MDC in J2EE environment

2003-04-03 Thread Ceki Gülcü
Hi Yoav, The rub with this approach is that the MDC for a certain key might be set when it should be empty. At 09:22 AM 4/3/2003 -0500, you wrote: Howdy, My convention with MDC and NDC has been for each method to just worry about its own logging. For example: In SessionBeanA: public void execu

Re: MDC in J2EE environment

2003-04-03 Thread Ceki Gülcü
Steven, Your question is quite intriguing. One solution would be to use some sort of counting. Thus, each time you set a key in the MDC you would increment the count of that key in the MDC by one. Each time you would "remove" the key you would decrement the count by one but not really remove (

RE: MDC in J2EE environment

2003-04-03 Thread Ebersole, Steven
Users List |Subject: RE: MDC in J2EE environment | | | |Howdy, |My convention with MDC and NDC has been for each method to |just worry |about its own logging. For example: | |In SessionBeanA: |public void executeUseCase() | // Put whatever you wan

RE: MDC in J2EE environment

2003-04-03 Thread Shapira, Yoav
Howdy, My convention with MDC and NDC has been for each method to just worry about its own logging. For example: In SessionBeanA: public void executeUseCase() // Put whatever you want into MDC // Log entry into SessionBeanA::executeUseCase ... // Call SessionBeanB::executeUseCaseB() ..