From afdebb15157b876379388372b3152e17ea4f3366 Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Thu, 22 Jan 2015 21:52:50 +0000 Subject: [PATCH] remove logger.hh that has been moved to v4l2wrapper --- inc/logger.h | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 inc/logger.h diff --git a/inc/logger.h b/inc/logger.h deleted file mode 100644 index 01922dc..0000000 --- a/inc/logger.h +++ /dev/null @@ -1,46 +0,0 @@ -/* --------------------------------------------------------------------------- -** This software is in the public domain, furnished "as is", without technical -** support, and with no warranty, express or implied, as to its usefulness for -** any purpose. -** -** logger.h -** -** -------------------------------------------------------------------------*/ - -#ifndef LOGGER_H -#define LOGGER_H - -#include "log4cpp/Category.hh" -#include "log4cpp/FileAppender.hh" -#include "log4cpp/PatternLayout.hh" - - -#define LOG(__level) log4cpp::Category::getRoot() << log4cpp::Priority::__level << __FILE__ << ":" << __LINE__ << " " - -inline void initLogger(int verbose) -{ - // initialize log4cpp - log4cpp::Category &log = log4cpp::Category::getRoot(); - log4cpp::Appender *app = new log4cpp::FileAppender("root", ::dup(fileno(stdout))); - if (app) - { - log4cpp::PatternLayout *plt = new log4cpp::PatternLayout(); - if (plt) - { - plt->setConversionPattern("%d [%p] - %m%n"); - app->setLayout(plt); - } - log.addAppender(app); - } - switch (verbose) - { - case 2: log.setPriority(log4cpp::Priority::DEBUG); break; - case 1: log.setPriority(log4cpp::Priority::INFO); break; - default: log.setPriority(log4cpp::Priority::NOTICE); break; - - } - LOG(INFO) << "level:" << log4cpp::Priority::getPriorityName(log.getPriority()); -} - -#endif -