problem mit log4cxx
-
hallo leutz,
ich weiss nicht ob das hier das richtige unter-forum ist (falls nicht, sorry vorab):
ich habe ein problem mit log4cxx:
in einer eigentstaendigen applikation die log4cxx benutzt steht in meiner main.cpp etwa#include <log4cxx/logger.h> #include <log4cxx/propertyconfigurator.h> #include <log4cxx/helpers/exception.h> #include <boost/thread/mutex.hpp> #include <boost/thread/condition.hpp> using namespace log4cxx; using namespace log4cxx::helpers; LoggerPtr logger(Logger::getLogger("Game")); int main(int argc, char* argv[]) { PropertyConfigurator::configure("log4cxx_m2682.conf"); ... }Dies funktioniert einwandfrei.
Nun habe ich eine Lib programmiert die von einer anderen applikation verwendet wird. Die Funktionen dieser lib werden ueber eine singleton-instanz von der lib-Klasse der applikation zu verfuegung gestellt.
Die log4cxx sachen von oben sind in den konstruktor der lib-klasse eingebaut (stehen im lctrl.cpp modul meiner lib):
#include <log4cxx/logger.h> #include <log4cxx/propertyconfigurator.h> #include <log4cxx/helpers/exception.h> using namespace log4cxx; using namespace log4cxx::helpers; using namespace std; LoggerPtr logger(Logger::getLogger("LCtrl")); // //////////////////////////////////////////////// B_LCtrl::B_LCtrl( ) // //////////////////////////////////////////////// { PropertyConfigurator::configure("log4cxx_lctrl.conf"); ... }Das Problem taucht auf bei Aufruf der configure methode im Konstruktor.
Ich bekomme ein SIGSEGV Signal auf meinem LinuxBSD System (auf welchem ich entwickle). Der Aufruf trace geht recht weit runter auf unterste ebene:log4cxx::PropertyConfigurator::configure (liblog4cxx.so.9)
log4cxx::PropertyConfigurator::doConfigure (liblog4cxx.so.9)
PropertyParser::parse (liblog4cxx.so.9)
std::basic_ios<char, std::char_traits<char> >::init (libstdc++.so.6)
std::ios_base::_M_init (libstdc++.so.6)
std::locale::operator= (libstdc++.so.6)
__gnu_cxx:__exchange_and_add (libstdc++.so.6)auf den ersten blick hats was mit ner string zuweisung zu tun aber keine ahnung wieso sowas bei ner lib nicht funktionieren sollte und bei ner normalen applikation schon.
hat jemand schonmal sowas gehabt und hat ne idee woran es liegen koennte :S ?
danke.