Hi Thorsten, I was looking into this problem again:
My process is call MyAI. MyAi is loading its instance of log4cxx like this: static log4cxx::LoggerPtr loggerMyAI; LoggerPtr MyAI::loggerMyAI(Logger::getLogger("MyAI")); PropertyConfigurator::configure("log4jMyAI.properties"); After this configure method, The first trace is sent using log4MyAI.properties correctly. After that, the process loads a dll that uses log4cxx in the same way the process. static log4cxx::LoggerPtr logger; LoggerPtr AI::logger(Logger::getLogger("AI")); PropertyConfigurator::configure("log4jAI.properties"); And after that, all traces (process and dll's) are sent using log4jAI.properties. I was looking how the process is loading log4cxx library with ldd and I think that is using it dinamically (correct me if Im wrong): (PROCESS) ldd ActiveInterfaceTest liblog4cxx.so.10 => /usr/lib/liblog4cxx.so.10 (0x00007f813ed09000) (DLL) ldd libAI.so liblog4cxx.so.10 => /usr/lib/liblog4cxx.so.10 (0x00007fb53683a000) What I'm doing wrong? I think that Im linking with the correct dinamic library... Regards 2013/1/17 Oscar Pernas <os...@pernas.es> > Hi Thorsten, > > I was looking into this problem again: > > My process is call MyAI. MyAi is loading its instance of log4cxx like this: > > static log4cxx::LoggerPtr loggerMyAI; > LoggerPtr MyAI::loggerMyAI(Logger::getLogger("MyAI")); > PropertyConfigurator::configure("log4jMyAI.properties"); > > After this configure method, The first trace is sent using > log4MyAI.properties correctly. > > > > After that, the process loads a dll that uses log4cxx in the same way the > process. > > static log4cxx::LoggerPtr logger; > LoggerPtr AI::logger(Logger::getLogger("AI")); > PropertyConfigurator::configure("log4jAI.properties"); > > And after that, all traces (process and dll's) are sent using > log4jAI.properties. > > > I was looking how the process is loading log4cxx library with ldd and I > think that is using it dinamically (correct me if Im wrong): > > (PROCESS) > > ldd ActiveInterfaceTest > liblog4cxx.so.10 => /usr/lib/liblog4cxx.so.10 (0x00007f813ed09000) > > > > (DLL) ldd libAI.so > liblog4cxx.so.10 => /usr/lib/liblog4cxx.so.10 (0x00007fb53683a000) > > > What I'm doing wrong? I think that Im linking with the correct dinamic > library... > > > Regards > > > 2012/10/24 Thorsten Schöning <tschoen...@am-soft.de> > >> Guten Tag Oscar Pernas, >> am Mittwoch, 24. Oktober 2012 um 16:14 schrieben Sie: >> >> > Is log4cxx a singleton? could I have different instances of log4cxx in >> > the same process? >> >> This should answer your question with no on dynamic linking like yours. >> >> >> http://mail-archives.apache.org/mod_mbox/logging-log4cxx-user/200408.mbox/%3c856dbbce-f622-11d8-b017-000393b97...@apache.org%3E >> >> Mit freundlichen Grüßen, >> >> Thorsten Schöning >> >> -- >> Thorsten Schöning E-Mail:thorsten.schoen...@am-soft.de >> AM-SoFT IT-Systeme http://www.AM-SoFT.de/ >> >> Telefon...........05151- 9468- 55 >> Fax...............05151- 9468- 88 >> Mobil..............0178-8 9468- 04 >> >> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln >> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow >> >> > > > -- > Óscar Pernas Plaza. > -- Óscar Pernas Plaza.