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'
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
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
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
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
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
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
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 (
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
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()
..
10 matches
Mail list logo