diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-20 17:52:28 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-20 20:32:21 +0100 |
commit | 11d50d950cccfe8bdc6c3f4a19dcda8661fc80bf (patch) | |
tree | de86122c22a7bf0750615a46b512584c537684be /CommonLibs/Logger.cpp | |
parent | 8bd111c942d0d8d2c65369db8f2623eadef54c1e (diff) |
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
Diffstat (limited to 'CommonLibs/Logger.cpp')
-rw-r--r-- | CommonLibs/Logger.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
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<numLevels); @@ -145,7 +130,7 @@ ostringstream& Log::get() -void gLogInit(const char* name, const char* level, int facility, char* fn) +void gLogInit(const char* level, char *fn) { // Set the level if one has been specified. if (level) @@ -162,9 +147,6 @@ void gLogInit(const char* name, const char* level, int facility, char* fn) std::cout << "Logging to file: " << fn << "\n"; } } - - // Open the log connection. - openlog(name,0,facility); } // vim: ts=4 sw=4 |