logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Static initialization order (was Re: I degrade some softwares on my computer ...)
Date Thu, 21 Oct 2004 00:24:00 GMT
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.


Mime
View raw message