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: Static initialization order (was Re: I degrade some softwares on my computer ...)
Date Thu, 21 Oct 2004 04:58:56 GMT
Jira is still down, so I went ahead and committed a patch that 
eliminates dependency on all non-local static variables (didn't mess 
with ThreadLocalStorage).  I would appreciate any feedback especially 
from those who reported segmentation faults at startup.

On Oct 20, 2004, at 7:24 PM, Curt Arnold wrote:

> Thanks, the traceback is consistent with attempting to configure 
> before the static string DEBUG_KEY has been constructed.  I've just 
> completed a fairly wide-ranging patch that eliminates use of non-local 
> static variables (see item 47 in Effective C++ for background) within 
> log4cxx.    However, the bug database has been having problems for a 
> couple of hours and so I can't get a bug number to use in the commit.  
> If it stays down another hour, I'll do the commit anyway.
> The most commonly used non-local static variables are the 
> log4cxx::Level::DEBUG and similar level "constants".  I could not 
> remove those without breaking almost all code that uses log4cxx, so 
> I've left them in but added accessors, log4cxx::Level::getDebug(), etc 
> that are safe for use at any time and changed all references to 
> log4cxx::Level::DEBUG inside log4cxx to use the accessor.

View raw message