From cc445067d1f61e12dbea4e6458f2c85ba58f01bf Mon Sep 17 00:00:00 2001 From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674> Date: 星期五, 30 十二月 2016 14:28:14 +0800 Subject: [PATCH] fix config, fix some log and todo --- RtspFace/logger.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/RtspFace/logger.h b/RtspFace/logger.h index fe50d00..5d7b344 100644 --- a/RtspFace/logger.h +++ b/RtspFace/logger.h @@ -20,6 +20,12 @@ #define LOG(__level) log4cpp::Category::getRoot() << log4cpp::Priority::__level << __FILE__ << ":" << __LINE__ << "\t" #define LOGP(__level, __format, arg...) log4cpp::Category::getRoot().log(log4cpp::Priority::__level, "%s:%d\t" __format, __FILE__, __LINE__, ##arg); +#define LOG_DEBUG LOG(DEBUG) // Debug message do not care in any production environment +#define LOG_INFO LOG(INFO) // Not significant event but useful for deal with online problem +#define LOG_NOTICE LOG(NOTICE) // Important event +#define LOG_WARN LOG(WARN) // Important event or input which will lead to errors +#define LOG_ERROR LOG(ERROR) // Error message means program running in an abnormal (not expected) way + inline void initLogger(int verbose) { // initialize log4cpp @@ -42,7 +48,7 @@ default: log.setPriority(log4cpp::Priority::NOTICE); break; } - LOG(INFO) << "level:" << log4cpp::Priority::getPriorityName(log.getPriority()); + LOG_INFO << "level:" << log4cpp::Priority::getPriorityName(log.getPriority()); } #endif -- Gitblit v1.8.0