On Dec 9, 2004, at 4:16 PM, [EMAIL PROTECTED] wrote:
I am developing a cross platform system using Log4Cxx, CppUnit, Boost and STLPort. Under Linux I'm using Gcc 3.3.4 and under Windows VC7.1.
Under Windows it all works pretty well, after some sleepless nights, but under Linux, Log4Cxx can't find any of the Appenders. I've trimmed the program down to just Log4Cxx, and still no go. I trimmed the Config file down to the root logger, my logger, and two appenders, a FileAppender and the ConsoleAppender using the DOMConfigurator.
I turned on Internal debugging and added some LogLogs to try and figure out what is going on (see below, I trimmed out my mesages), and what I see is the there are no appenders in the registry map, but they get added after I ask for them. Even so, I can't create appenders (I hoped that after getting them into the registry, things would work out, but no dice.)
Are you doing your configuration in the constructor of a non-local static variable? Since there is no guarantee on the order that these initializers occur, there is the possibility that the configuration is being interpreted before the available appenders have added themselves to the map used to resolve the configuration file. In that case, you need to find some way to defer configuration until all the non-local static variables have been initialized.
