Hi,
Thanks for reply! I'm not sure, but I changed code for handling CTRL+C
and issue looks like fixed. May be it was not problem with log4cxx..
Code looks now like this:
#include <windows.h>
#include <stdio.h>
#include <log4cxx/logger.h>
#include <log4cxx/xml/domconfigurator.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/helpers/exception.h>
using namespace log4cxx;
using namespace log4cxx::xml;
using namespace log4cxx::helpers;
LoggerPtr logger(Logger::getLogger("Log4cxxTest"));
static volatile bool g_exit = false;
static BOOL WINAPI console_ctrl_handler(DWORD dwCtrlType)
{
g_exit = true;
return TRUE;
}
int _tmain(int argc, _TCHAR* argv[])
{
int result = EXIT_SUCCESS;
try
{
// Load configuration file
//DOMConfigurator::configure("PIAdapterLogConfig.xml");
//PropertyConfigurator::configure("PIAdapterLogConfig.xml");
BasicConfigurator::configure();
SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
while (!g_exit);
}
catch(Exception&)
{
result = EXIT_FAILURE;
}
return result;
}
On Fri, May 25, 2012 at 9:46 AM, Thorsten Schöning
<[email protected]> wrote:
> Guten Tag Vladislav Krejcirik,
> am Freitag, 25. Mai 2012 um 09:11 schrieben Sie:
>
>> Unhandled exception at 0x10171754 in Log4cxxTest.exe: 0xC0000005:
>> Access violation reading location 0xfeeefefe.
>
> There are known problems in the shutdown of log4cxx, the following may
> help. I had to uncomment the call to apr_terminate in some classes.
>
> http://mail-archives.apache.org/mod_mbox/logging-log4cxx-dev/200901.mbox/%[email protected]%3E
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning E-Mail:[email protected]
> AM-SoFT IT-Systeme http://www.AM-SoFT.de/
>
> Telefon.............030-2 1001-310
> Fax...............05151- 9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
--
/**************************************/
Best regards / S pozdravem
Vladislav Krejčiřík
http://www.vkrejcirik.info