<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[problem mit log4cxx]]></title><description><![CDATA[<p>hallo leutz,</p>
<p>ich weiss nicht ob das hier das richtige unter-forum ist (falls nicht, sorry vorab):</p>
<p>ich habe ein problem mit log4cxx:<br />
in einer eigentstaendigen applikation die log4cxx benutzt steht in meiner main.cpp etwa</p>
<pre><code>#include &lt;log4cxx/logger.h&gt;
#include &lt;log4cxx/propertyconfigurator.h&gt;
#include &lt;log4cxx/helpers/exception.h&gt;
#include &lt;boost/thread/mutex.hpp&gt;
#include &lt;boost/thread/condition.hpp&gt;

using namespace log4cxx;
using namespace log4cxx::helpers;

LoggerPtr logger(Logger::getLogger(&quot;Game&quot;));

int main(int argc, char* argv[])
{
 PropertyConfigurator::configure(&quot;log4cxx_m2682.conf&quot;);
 ...
}
</code></pre>
<p>Dies funktioniert einwandfrei.</p>
<p>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.</p>
<p>Die log4cxx sachen von oben sind in den konstruktor der lib-klasse eingebaut (stehen im lctrl.cpp modul meiner lib):</p>
<pre><code>#include &lt;log4cxx/logger.h&gt;
#include &lt;log4cxx/propertyconfigurator.h&gt;
#include &lt;log4cxx/helpers/exception.h&gt;
using namespace log4cxx;
using namespace log4cxx::helpers;
using namespace std;

LoggerPtr logger(Logger::getLogger(&quot;LCtrl&quot;));

// ////////////////////////////////////////////////
B_LCtrl::B_LCtrl( )
// ////////////////////////////////////////////////
{
  PropertyConfigurator::configure(&quot;log4cxx_lctrl.conf&quot;);
  ...
}
</code></pre>
<p>Das Problem taucht auf bei Aufruf der configure methode im Konstruktor.<br />
Ich bekomme ein SIGSEGV Signal auf meinem LinuxBSD System (auf welchem ich entwickle). Der Aufruf trace geht recht weit runter auf unterste ebene:</p>
<blockquote>
<p>log4cxx::PropertyConfigurator::configure (liblog4cxx.so.9)<br />
log4cxx::PropertyConfigurator::doConfigure (liblog4cxx.so.9)<br />
PropertyParser::parse (liblog4cxx.so.9)<br />
std::basic_ios&lt;char, std::char_traits&lt;char&gt; &gt;::init (libstdc++.so.6)<br />
std::ios_base::_M_init (libstdc++.so.6)<br />
std::locale::operator= (libstdc++.so.6)<br />
__gnu_cxx:__exchange_and_add (libstdc++.so.6)</p>
</blockquote>
<p>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.</p>
<p>hat jemand schonmal sowas gehabt und hat ne idee woran es liegen koennte :S ?<br />
danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/292989/problem-mit-log4cxx</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 14:04:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/292989.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Sep 2011 13:00:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to problem mit log4cxx on Thu, 22 Sep 2011 13:00:54 GMT]]></title><description><![CDATA[<p>hallo leutz,</p>
<p>ich weiss nicht ob das hier das richtige unter-forum ist (falls nicht, sorry vorab):</p>
<p>ich habe ein problem mit log4cxx:<br />
in einer eigentstaendigen applikation die log4cxx benutzt steht in meiner main.cpp etwa</p>
<pre><code>#include &lt;log4cxx/logger.h&gt;
#include &lt;log4cxx/propertyconfigurator.h&gt;
#include &lt;log4cxx/helpers/exception.h&gt;
#include &lt;boost/thread/mutex.hpp&gt;
#include &lt;boost/thread/condition.hpp&gt;

using namespace log4cxx;
using namespace log4cxx::helpers;

LoggerPtr logger(Logger::getLogger(&quot;Game&quot;));

int main(int argc, char* argv[])
{
 PropertyConfigurator::configure(&quot;log4cxx_m2682.conf&quot;);
 ...
}
</code></pre>
<p>Dies funktioniert einwandfrei.</p>
<p>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.</p>
<p>Die log4cxx sachen von oben sind in den konstruktor der lib-klasse eingebaut (stehen im lctrl.cpp modul meiner lib):</p>
<pre><code>#include &lt;log4cxx/logger.h&gt;
#include &lt;log4cxx/propertyconfigurator.h&gt;
#include &lt;log4cxx/helpers/exception.h&gt;
using namespace log4cxx;
using namespace log4cxx::helpers;
using namespace std;

LoggerPtr logger(Logger::getLogger(&quot;LCtrl&quot;));

// ////////////////////////////////////////////////
B_LCtrl::B_LCtrl( )
// ////////////////////////////////////////////////
{
  PropertyConfigurator::configure(&quot;log4cxx_lctrl.conf&quot;);
  ...
}
</code></pre>
<p>Das Problem taucht auf bei Aufruf der configure methode im Konstruktor.<br />
Ich bekomme ein SIGSEGV Signal auf meinem LinuxBSD System (auf welchem ich entwickle). Der Aufruf trace geht recht weit runter auf unterste ebene:</p>
<blockquote>
<p>log4cxx::PropertyConfigurator::configure (liblog4cxx.so.9)<br />
log4cxx::PropertyConfigurator::doConfigure (liblog4cxx.so.9)<br />
PropertyParser::parse (liblog4cxx.so.9)<br />
std::basic_ios&lt;char, std::char_traits&lt;char&gt; &gt;::init (libstdc++.so.6)<br />
std::ios_base::_M_init (libstdc++.so.6)<br />
std::locale::operator= (libstdc++.so.6)<br />
__gnu_cxx:__exchange_and_add (libstdc++.so.6)</p>
</blockquote>
<p>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.</p>
<p>hat jemand schonmal sowas gehabt und hat ne idee woran es liegen koennte :S ?<br />
danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2122485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2122485</guid><dc:creator><![CDATA[pepe75]]></dc:creator><pubDate>Thu, 22 Sep 2011 13:00:54 GMT</pubDate></item></channel></rss>