[MERGED] osmo-trx[master]: Logger: Drop syslog support
Harald Welte has submitted this change and it was merged. Change subject: Logger: Drop syslog support .. 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 --- M CommonLibs/Logger.cpp M CommonLibs/Logger.h M INSTALLATION M Transceiver52M/osmo-trx.cpp M tests/CommonLibs/LogTest.cpp 5 files changed, 14 insertions(+), 47 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified 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 @@ // Switches to enable/disable logging targets bool gLogToConsole = true; -bool gLogToSyslog = false; FILE *gLogToFile = NULL; Mutex gLogToLock; @@ -99,15 +98,9 @@ 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) { @@ -128,14 +121,6 @@ } } - -Log::Log(const char* name, const char* level, int facility) -{ - mDummyInit = true; - gLogInit(name, level, facility); -} - - ostringstream& Log::get() { assert(mPriority
osmo-trx[master]: Logger: Drop syslog support
Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/6613 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8282745ef0282d41599eaf94fe460a1d29b18e2a Gerrit-PatchSet: 2 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Pau Espin PedrolGerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No
[PATCH] osmo-trx[master]: Logger: Drop syslog support
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/6613 to look at the new patch set (#2). 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 --- M CommonLibs/Logger.cpp M CommonLibs/Logger.h M INSTALLATION M Transceiver52M/osmo-trx.cpp M tests/CommonLibs/LogTest.cpp 5 files changed, 14 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/13/6613/2 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 @@ // Switches to enable/disable logging targets bool gLogToConsole = true; -bool gLogToSyslog = false; FILE *gLogToFile = NULL; Mutex gLogToLock; @@ -99,15 +98,9 @@ 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) { @@ -128,14 +121,6 @@ } } - -Log::Log(const char* name, const char* level, int facility) -{ - mDummyInit = true; - gLogInit(name, level, facility); -} - - ostringstream& Log::get() { assert(mPriority
[PATCH] osmo-trx[master]: Logger: Drop syslog support
Review at https://gerrit.osmocom.org/6613 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 --- M CommonLibs/Logger.cpp M CommonLibs/Logger.h M INSTALLATION M Transceiver52M/osmo-trx.cpp M tests/CommonLibs/LogTest.cpp 5 files changed, 14 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/13/6613/1 diff --git a/CommonLibs/Logger.cpp b/CommonLibs/Logger.cpp index 4bfb782..d10ad02 100644 --- a/CommonLibs/Logger.cpp +++ b/CommonLibs/Logger.cpp @@ -39,7 +39,6 @@ // Switches to enable/disable logging targets bool gLogToConsole = true; -bool gLogToSyslog = false; FILE *gLogToFile = NULL; Mutex gLogToLock; @@ -99,15 +98,9 @@ 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) { @@ -128,14 +121,6 @@ } } - -Log::Log(const char* name, const char* level, int facility) -{ - mDummyInit = true; - gLogInit(name, level, facility); -} - - ostringstream& Log::get() { assert(mPriority