summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Müller2019-02-17 22:02:50 +0100
committerWolfgang Müller2019-02-17 22:02:50 +0100
commitee8fc73f7a56043f9bdbe2ea438cf7efe64c21b0 (patch)
treebc9af0dcc389ef1a40ffa3677f243bfb09093d9a
parent19097f2ca08a3308a9a67cd48eea4faffd94c639 (diff)
downloadportage-roles-ee8fc73f7a56043f9bdbe2ea438cf7efe64c21b0.tar.gz
Remove syslog patch for quassel
Obsoleted with addition of quassel-0.13.1 into the main Gentoo tree.
-rw-r--r--service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch110
1 files changed, 0 insertions, 110 deletions
diff --git a/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch b/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch
deleted file mode 100644
index ce9ba55..0000000
--- a/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-diff --git a/src/common/logger.cpp b/src/common/logger.cpp
-index ed8d8023..7bf7efb7 100644
---- a/src/common/logger.cpp
-+++ b/src/common/logger.cpp
-@@ -36,9 +36,28 @@ namespace {
-
- QByteArray msgWithTime(const Logger::LogEntry &msg)
- {
-- return (msg.timeStamp.toString("yyyy-MM-dd hh:mm:ss ") + msg.message + "\n").toUtf8();
--};
-+ QString levelString;
-+
-+ switch (msg.logLevel) {
-+ case Logger::LogLevel::Debug:
-+ levelString = "[Debug] ";
-+ break;
-+ case Logger::LogLevel::Info:
-+ levelString = "[Info ] ";
-+ break;
-+ case Logger::LogLevel::Warning:
-+ levelString = "[Warn ] ";
-+ break;
-+ case Logger::LogLevel::Error:
-+ levelString = "[Error] ";
-+ break;
-+ case Logger::LogLevel::Fatal:
-+ levelString = "[FATAL] ";
-+ break;
-+ }
-
-+ return (msg.timeStamp.toString("yyyy-MM-dd hh:mm:ss ") + levelString + msg.message + "\n").toUtf8();
-+};
- }
-
-
-@@ -114,6 +133,23 @@ bool Logger::setup(bool keepMessages)
-
- #ifdef HAVE_SYSLOG
- _syslogEnabled = Quassel::isOptionSet("syslog");
-+
-+ Quassel::RunMode mode = Quassel::runMode();
-+ Quassel::BuildInfo info = Quassel::buildInfo();
-+ QString prgname = info.applicationName;
-+
-+ if (mode == Quassel::RunMode::ClientOnly) {
-+ prgname = info.clientApplicationName;
-+ } else if (mode == Quassel::RunMode::CoreOnly) {
-+ prgname = info.coreApplicationName;
-+ }
-+
-+ _prgname = prgname.toLocal8Bit();
-+
-+ // set up options, program name, and facility for later calls to syslog(3)
-+ if (_syslogEnabled) {
-+ openlog(_prgname.constData(), LOG_PID, LOG_USER);
-+ }
- #endif
-
- _initialized = true;
-@@ -166,28 +202,8 @@ void Logger::handleMessage(QtMsgType type, const QString &msg)
-
- void Logger::handleMessage(LogLevel level, const QString &msg)
- {
-- QString logString;
--
-- switch (level) {
-- case LogLevel::Debug:
-- logString = "[Debug] ";
-- break;
-- case LogLevel::Info:
-- logString = "[Info ] ";
-- break;
-- case LogLevel::Warning:
-- logString = "[Warn ] ";
-- break;
-- case LogLevel::Error:
-- logString = "[Error] ";
-- break;
-- case LogLevel::Fatal:
-- logString = "[FATAL] ";
-- break;
-- }
--
- // Use signal connection to make this method thread-safe
-- emit messageLogged({QDateTime::currentDateTime(), level, logString += msg});
-+ emit messageLogged({QDateTime::currentDateTime(), level, msg});
- }
-
-
-@@ -229,7 +245,7 @@ void Logger::outputMessage(const LogEntry &message)
- case LogLevel::Fatal:
- prio = LOG_CRIT;
- }
-- syslog(prio|LOG_USER, "%s", qPrintable(message.message));
-+ syslog(prio, "%s", qPrintable(message.message));
- }
- #endif
-
-diff --git a/src/common/logger.h b/src/common/logger.h
-index 8c1f2f00..a9a8ab69 100644
---- a/src/common/logger.h
-+++ b/src/common/logger.h
-@@ -111,6 +111,7 @@ private:
- std::vector<LogEntry> _messages;
- bool _keepMessages{true};
- bool _initialized{false};
-+ QByteArray _prgname;
- };
-
- Q_DECLARE_METATYPE(Logger::LogEntry)