This is an example of logging in static initialization code and using the current module name to select the Log4cxx configuration file.
#include "com/foo/config.h"
auto rootLogger = com::foo::getLogger();
struct ExampleStaticData {
ExampleStaticData() {
}
} static_object;
int main() {
return EXIT_SUCCESS;
}
#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:2307
#define LOG4CXX_DEBUG(logger, message)
Add a new logging event containing message to attached appender(s) if logger is enabled for DEBUG eve...
Definition: log4cxx/logger.h:2221