aboutsummaryrefslogtreecommitdiff
path: root/apps/log4cplus-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'apps/log4cplus-test.cpp')
-rw-r--r--apps/log4cplus-test.cpp50
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;
-}