logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Is it safe to use log4cxx in multi-threaded environement?
Date Mon, 06 Dec 2004 19:21:13 GMT

On Dec 6, 2004, at 12:38 PM, Jeff Lynn wrote:

> So by not requesting another instance of logger, do you mean I should 
> use global variable in the main thread dnd and "extern" in worker 
> threads?

Are you sure you meant threads?  Sounds like you might be intended to 
talk about child processes which is a totally different animal to which 
the previous discussion does not apply.

Threads are independent code paths in the same application.  You can 
access all the variables that any other thread in the application can 
access (however bad things can happen if you aren't careful).  
Variables aren't "extern" for a thread, they are "extern" for a 
compilation unit.

View raw message