From 11d50d950cccfe8bdc6c3f4a19dcda8661fc80bf Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 20 Feb 2018 17:52:28 +0100 Subject: Logger: Drop syslog support This feature is currently not being used, so let's drop it to make it easier to integrate into libosmocore logging system in the future. Change-Id: I8282745ef0282d41599eaf94fe460a1d29b18e2a --- CommonLibs/Logger.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'CommonLibs/Logger.cpp') diff --git a/CommonLibs/Logger.cpp b/CommonLibs/Logger.cpp index 4bfb782..2cdd158 100644 --- a/CommonLibs/Logger.cpp +++ b/CommonLibs/Logger.cpp @@ -39,7 +39,6 @@ using namespace std; // Switches to enable/disable logging targets bool gLogToConsole = true; -bool gLogToSyslog = false; FILE *gLogToFile = NULL; Mutex gLogToLock; @@ -99,16 +98,10 @@ std::ostream& operator<<(std::ostream& os, std::ostringstream& ss) Log::~Log() { - if (mDummyInit) return; // Anything at or above LOG_CRIT is an "alarm". if (mPriority <= LOG_ERR) { cerr << mStream.str() << endl; } - // Current logging level was already checked by the macro. So just log. - // Log to syslog - if (gLogToSyslog) { - syslog(mPriority, "%s", mStream.str().c_str()); - } // Log to file and console if (gLogToConsole||gLogToFile) { int mlen = mStream.str().size(); @@ -128,14 +121,6 @@ Log::~Log() } } - -Log::Log(const char* name, const char* level, int facility) -{ - mDummyInit = true; - gLogInit(name, level, facility); -} - - ostringstream& Log::get() { assert(mPriority