AFAIR you have to configure the log4cxx system at the beginning of your program, e.g. using a BasicConfigurator as shown in this Short introduction to Apache log4cxx:
#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 argc, char **argv)
{
// Set up a simple configuration that logs on the console.
BasicConfigurator::configure();
LOG4CXX_INFO(logger, "Entering application.");
// ...
return 0;
}
AFAIR you have to configure the log4cxx system at the beginning of your program, e.g. using a
BasicConfigurator
as shown in this Short introduction to Apache log4cxx:HTH Martin