This example can be built with com/foo/config2.cpp or com/foo/config4.cpp to configure Log4cxx on the first call the com::foo::getLogger.
#include "com/foo/config.h"
#include "com/foo/bar.h"
int main(int argc, char **argv) {
int result = EXIT_SUCCESS;
try {
auto logger = com::foo::getLogger("MyApp");
com::foo::Bar bar;
bar.doIt();
}
catch(std::exception&) {
result = EXIT_FAILURE;
}
return result;
}
#define LOG4CXX_INFO(logger, message)
Add a new logging event containing message to attached appender(s) if logger is enabled for INFO even...
Definition log4cxx/logger.h:2386