From fe5c8ea5075bf2833d70d210e4e458050a451d27 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Fri, 1 Apr 2011 21:40:39 +0200 Subject: [PATCH] logger functions do not have loglevel arguments anymore, they are handled in the macros --- include/Logger.hpp | 10 ++++------ src/Logger.cpp | 18 ++++++++---------- test/run_test.sh | 2 +- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/include/Logger.hpp b/include/Logger.hpp index 7b537de..fccc3b9 100644 --- a/include/Logger.hpp +++ b/include/Logger.hpp @@ -33,14 +33,12 @@ public: static void setLogLevel ( const LogLevel loglevel ); inline static LogLevel getLoglevel() { return m_logLevel; } - static void log_pointer( const LogLevel loglevel, - const void* msg, + static void log_pointer( const void* msg, const char* file, int line, const char* function); - static void log_string( const LogLevel loglevel, - const char* msg, + static void log_string( const char* msg, const char* file, int line, const char* function); @@ -69,7 +67,7 @@ private: if(MAX_LOFLEVEL >= Logger::FINEST && \ Logger::getInstance()->getLoglevel() >= Logger::FINEST ) \ Logger::getInstance()->log_pointer( \ - Logger::FINEST, this, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + this, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ else (void)0 @@ -77,7 +75,7 @@ else (void)0 if (MAX_LOFLEVEL >= level && \ Logger::getInstance()->getLoglevel() >= Logger::FINEST ) \ Logger::getInstance()->log_string( \ - level, msg, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ + msg, __FILE__, __LINE__, __PRETTY_FUNCTION__); \ else (void)0 diff --git a/src/Logger.cpp b/src/Logger.cpp index 068c11c..f310aae 100644 --- a/src/Logger.cpp +++ b/src/Logger.cpp @@ -16,11 +16,10 @@ void Logger::setLogLevel ( const LogLevel loglevel ) -void Logger::log_pointer( const LogLevel loglevel, - const void* msg, - const char* file, - int line, - const char* function) +void Logger::log_pointer( const void* msg, + const char* file, + int line, + const char* function) { *m_ostream << getTime() << " " << extractFilename(file) << ":" @@ -31,11 +30,10 @@ void Logger::log_pointer( const LogLevel loglevel, } -void Logger::log_string( const LogLevel loglevel, - const char* msg, - const char* file, - int line, - const char* function) +void Logger::log_string( const char* msg, + const char* file, + int line, + const char* function) { *m_ostream << getTime() << " " << extractFilename(file) << ":" diff --git a/test/run_test.sh b/test/run_test.sh index 6444c05..47bde77 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -98,7 +98,7 @@ lcov -r lcov.info "g++-v*" -o lcov.info lcov -r lcov.info "/usr/include/cxxtest*" -o lcov.info lcov -r lcov.info "*cpp_utils/test*" -o lcov.info -echo -e "${pre}Generating HTML${post}" +echo -e "${pre}Generating coverage HTML${post}" rm -rf ./cov mkdir cov genhtml --frames --legend -o ./cov lcov.info