logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Fester <Andreas.Fes...@gmx.de>
Subject Re: Problem in using NDC in log4cxx-0.9.8
Date Sun, 13 Nov 2005 20:40:21 GMT
Hi Munir,

note that log4cxx-user is the proper list for log4cxx related
questions :-)

I dont think that your issue is related to NDC
directly. I tried the following:

BasicConfigurator::configure();
logger->debug ("message0");
log4cxx::NDC::push ("(a)");
logger->debug ("message1");
log4cxx::NDC::pop ();
logger->debug ("message2");

and also get a "null" for the first logging request, before
having executed any NDC specific operations:

4 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase null - message0
5 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase (a) - message1
5 [0xb772e8e0] DEBUG org.apache.log4j.NDCTestCase null - message2

So I think it is more an issue of the layout pattern,
which tries to render the name of the NDC, which is null for the
top level NDC.

How do you configure log4cxx? Are you also using the
BasicConfigurator, or a specific configuration?

I dont know yet how log4j behaves in this case, have to
find this out first...

Regards,

	Andreas

Munir Badir wrote:
> Hi,
> 
> I once used log4cxx-0.9.7 and the result of the following:
> 
>  
> 
> log4cxx::NDC::push ("(a)");
> 
> logger->debug ("message1");
> 
> log4cxx::NDC::pop ();
> 
> logger->debug ("message2");
> 
>  
> 
>  
> 
> was:
> 
> .. (a) message1
> 
> ... message2
> 
>  
> 
> And now when I'm using the log4cxx-0.9.8 the result is:
> 
> .. (a) message1
> 
> ... null message2

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288

Mime
View raw message