logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Young <byo...@jumptrading.com>
Subject Problem on Windows
Date Tue, 04 Jan 2005 20:41:23 GMT

I am getting an error on termination of a program using log4cxx 0.9.7 
under Windows VC6.0.  It appears that the destructor for the logger 
object is causing a memory error.  Here is the code:

#include "log4cxx/logger.h"
#include "log4cxx/basicconfigurator.h"
#include "log4cxx/helpers/exception.h"

using namespace log4cxx;
using namespace log4cxx::helpers;

LoggerPtr logger(Logger::getLogger("MyApp"));

int main()
     int result = EXIT_SUCCESS;
    try {
        LOG4CXX_INFO(logger, "Starting test.");
    catch (Exception&)
        result = EXIT_FAILURE;

    return 0;

I see the message from the logger on the console OK, but then get a 
dialog box with the following text:

The instruction at "0x55901a9d" referenced memory at "0x003f3e50".  The 
memory could not be "read".
Click on OK to terminate the program

Any ideas?

View raw message