This file is an example of how to configure Log4cxx in a Qt application.
#include <QCoreApplication>
#include "com/foo/config-qt.h"
#include "com/foo/bar.h"
int main(int argc, char **argv) {
int result = EXIT_SUCCESS;
QCoreApplication app(argc, argv);
com::foo::ConfigureLogging();
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:2307