aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/Logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CommonLibs/Logger.cpp')
-rw-r--r--CommonLibs/Logger.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/CommonLibs/Logger.cpp b/CommonLibs/Logger.cpp
index 57d2bff..d8bfc6e 100644
--- a/CommonLibs/Logger.cpp
+++ b/CommonLibs/Logger.cpp
@@ -150,6 +150,7 @@ void addAlarm(const string& s)
Log::~Log()
{
+ if (mDummyInit) return;
// Anything at or above LOG_CRIT is an "alarm".
// Save alarms in the local list and echo them to stderr.
if (mPriority <= LOG_CRIT) {
@@ -162,6 +163,13 @@ Log::~Log()
}
+Log::Log(const char* name, const char* level, int facility)
+{
+ mDummyInit = true;
+ gLogInit(name, level, facility);
+}
+
+
ostringstream& Log::get()
{
assert(mPriority<numLevels);