From b88d0fb5fdb78ba425ddbe6c424af27c30822d90 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 1 Jun 2010 21:49:09 +0000 Subject: [PATCH] Fixed issue 480 --- lib/base/CLog.cpp | 4 +++- lib/base/CLog.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/base/CLog.cpp b/lib/base/CLog.cpp index 616545d9..d598b1d3 100644 --- a/lib/base/CLog.cpp +++ b/lib/base/CLog.cpp @@ -169,7 +169,9 @@ CLog::print(const char* file, int line, const char* fmt, ...) } // print the prefix to the buffer. leave space for priority label. - if (file != NULL) { + // do not prefix time and file for kPRINT (CLOG_PRINT) + if ((file != NULL) && (priority != kPRINT)) { + char message[2048]; struct tm *tm; char tmp[220]; diff --git a/lib/base/CLog.h b/lib/base/CLog.h index 06cff03a..d766631b 100644 --- a/lib/base/CLog.h +++ b/lib/base/CLog.h @@ -40,6 +40,7 @@ public: The logging priority levels in order of highest to lowest priority. */ enum ELevel { + kPRINT = -1, //!< For print only (no file or time) kFATAL, //!< For fatal errors kERROR, //!< For serious errors kWARNING, //!< For minor errors and warnings