diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 00:15:04 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-06-21 00:15:43 +0200 |
commit | c56840f03cf139d60c6d90b55cf16e70f6ae2bc2 (patch) | |
tree | c9f19ab065496ac704fbf855da031ef5643eefa3 /apps/log4cplus-test.cpp | |
parent | d91e500592790f1ef22ebfe921f273a61ff6252f (diff) | |
download | ble-toys-c56840f03cf139d60c6d90b55cf16e70f6ae2bc2.tar.gz ble-toys-c56840f03cf139d60c6d90b55cf16e70f6ae2bc2.tar.bz2 ble-toys-c56840f03cf139d60c6d90b55cf16e70f6ae2bc2.tar.xz ble-toys-c56840f03cf139d60c6d90b55cf16e70f6ae2bc2.zip |
o Going all header file based and single-executable to launch all apps.
o Ading CMake magic to generate the launcher
Diffstat (limited to 'apps/log4cplus-test.cpp')
-rw-r--r-- | apps/log4cplus-test.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/apps/log4cplus-test.cpp b/apps/log4cplus-test.cpp deleted file mode 100644 index 39d9884..0000000 --- a/apps/log4cplus-test.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include <log4cplus/logger.h> -#include <log4cplus/configurator.h> -#include <iomanip> - -namespace trygvis { -using namespace log4cplus; -using namespace std; - -class LogSetup { -public: - LogSetup(string name) : logger(Logger::getInstance(LOG4CPLUS_TEXT(name))) { - } - -protected: - Logger logger; -}; - -class MyService : LogSetup { -public: - MyService() : LogSetup("trygvis.MyService") { - } - - void launchMissiles() { - LOG4CPLUS_DEBUG(logger, "some debug message"); - LOG4CPLUS_INFO(logger, "some info message"); - LOG4CPLUS_WARN(logger, "some warning message"); - } -}; -} - -using namespace std; -using namespace log4cplus; -using namespace trygvis; - -int main() { - BasicConfigurator config; - config.configure(); - - cout << "Hello world!" << endl; - - Logger l = Logger::getRoot(); - - l.setLogLevel(INFO_LOG_LEVEL); - - MyService myService; - - myService.launchMissiles(); - - return EXIT_SUCCESS; -} |