Re: [Log4cplus-devel] _static_log4cplus_initializer not called
Logging Framework for C++
Brought to you by:
wilx
From: Václav H. <v.h...@sh...> - 2009-07-30 19:56:02
|
Philipp Kursawe wrote, On 30.7.2009 16:30: > Message body follows: > > Hello, > > I try to use your log library statically inside my win32 dll > project. Somehow the _static_log4cplus_initializer class is > not instantiated. The code is generated but not called. If you have built log4cplus as DLL then it does not use _static_log4cplus_initializer, in case of DLL it uses DllMain() function to initalize things. > > Also, since my dll project does not have a console, all > calls to tcerr (which is null) vial LogLog fail and the > exceptions are not catched. I have enabled C++ Exception > Handling in my compiler settings though. Internal error reporting/logging is rather inconsistent and incomplete. In case you do not have access to std::cerr there is not much you can do right now. I will try to improve it for 1.0.4. > > I am using Visual Studio 2005 Professional. > > Also the NTEventAppender does not work as expected. The dll > that is registerered in the Registry does not exists and I > think the EventLog fails to display the text of the event > message because of that. I will look into this. I thought that it just puts some longish text in front of the logged message if it cannot find the registered DLL. > > Thanks for your help, > Phil -- VH |