logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prestel, John D." <John.Pres...@ngc.com>
Subject RE: application property
Date Wed, 12 May 2010 15:01:13 GMT
Well that's less than ideal. I would prefer a means to set it once for
the entire process. I'll plan to experiment and poke through the source
unless someone knows how.

 

From: Dale King [mailto:dalewking@gmail.com] 
Sent: Wednesday, May 12, 2010 10:58 AM
To: Log4CXX User
Subject: Re: application property

 

I just remembered that MDC is local to each thread, so you need to do
this in each thread. In my case my code was a business logic DLL that
was called by a 3rd party app which created all the threads, so I
wrapped all my exposed entry points with MDC::put and MDC::remove.

On Wed, May 12, 2010 at 10:45 AM, Prestel, John D.
<John.Prestel@ngc.com> wrote:

Thanks, Dale! I'll try it and report my findings. 

 

From: Dale King [mailto:dalewking@gmail.com] 
Sent: Wednesday, May 12, 2010 10:41 AM
To: Log4CXX User
Subject: Re: application property

 

It does allow it, since I know that I've done it. Unfortunately that was
with a previous employer so I don't have access to the code.

I don't know if you can do it through the configuration file. I think I
did it using an MDC property in my app's initialization code as in:

   MDC::put( "application", "myapp" );

On Wed, May 12, 2010 at 10:28 AM, Prestel, John D.
<John.Prestel@ngc.com> wrote:

Does log4cxx provide a way to set the "application" property on logging
events via, presumably, an appender's configuration? Chainsaw uses this
property to determine which tab a log message should land in. It seems
log4j provides the ability to do this, but it's not clear where log4cxx
stands.

Reference: http://markmail.org/message/5ufciwvzoqyeqc5x




-- 
Dale King




-- 
Dale King


Mime
View raw message