On 2008-09-22 17:03, Peter Steele wrote:
We're using 0.9.7 in fact, under FreeBSD. Our case is bit more

Maybe we need to catch this IOException in our wrapper functions?

The IOException was in the 0.10.x code. I didn't see any exception around the writing to files in 0.9.7. As near as I could tell the iostream library was handing the full filesytem error by not writing any more but the rest of the program and logging kept working.

Perhaps it is something with the C wrappers. You could try my test program with a small file based filesystem loop mounted at /mnt

--
Jacob Anawalt
Gecko Software, Inc.
[EMAIL PROTECTED]
435-752-8026
// 2008-Sep-22 19:30
// Simple test application to test how log4cxx handles a full
// filesystem. /mnt was a small 1MiB ext2 filesystem (loop mounted
// file). When it filled up, the console logging, and thus the
// program, continued to work and did not crash. New logging
// events stopped writing to the file.
//
// This test was done with log4cxx 0.9.7. 
// g++ -ofullfs-log4cxx fullfs-log4cxx.cpp -llog4cxx
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/logger.h>
#include <log4cxx/fileappender.h>
#include <log4cxx/patternlayout.h>

int 
main(void)
{
        log4cxx::BasicConfigurator::configure();
        log4cxx::LayoutPtr l(new log4cxx::PatternLayout(
                "%d{%Y-%m-%d %H:%M:%S} %-5p %c %x - %m%n"));
        log4cxx::AppenderPtr a(new log4cxx::FileAppender(l,"/mnt/test"));
        a->setName("FILE");
        log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("MyApp"));
        logger->addAppender(a);
        log4cxx::LoggerPtr root(log4cxx::Logger::getRootLogger());

        while(1) {
                LOG4CXX_DEBUG(logger,"bla bla bla bla bla bla bla");
        }

        return EXIT_SUCCESS;
}

Reply via email to