diff options
author | Wolfgang Müller | 2019-02-13 14:20:23 +0000 |
---|---|---|
committer | Wolfgang Müller | 2019-02-13 14:20:23 +0000 |
commit | 79907ee5996006da2bac40e7aa720ec90cac299b (patch) | |
tree | f17afa7c4a1aa372a4bc573ffda4bbf2eaf76cdb | |
parent | 0eb51a6dfc20c45f9fd884f7ca6c678314a1c0e9 (diff) | |
download | portage-roles-79907ee5996006da2bac40e7aa720ec90cac299b.tar.gz |
service-quasselcore: Make patch apply to 0.13.0
Diffstat (limited to '')
-rw-r--r-- | service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch b/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch index 87f41a4..ce9ba55 100644 --- a/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch +++ b/service-quasselcore/patches/net-irc/quassel/syslog-fixes.patch @@ -1,12 +1,13 @@ diff --git a/src/common/logger.cpp b/src/common/logger.cpp -index b37abc29..80cec4b2 100644 +index ed8d8023..7bf7efb7 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp -@@ -37,7 +37,27 @@ namespace { +@@ -36,9 +36,28 @@ namespace { - QByteArray msgWithTime(const Logger::LogEntry& msg) + 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) { @@ -26,12 +27,13 @@ index b37abc29..80cec4b2 100644 + levelString = "[FATAL] "; + break; + } -+ + + return (msg.timeStamp.toString("yyyy-MM-dd hh:mm:ss ") + levelString + msg.message + "\n").toUtf8(); ++}; } - } // namespace -@@ -106,6 +126,23 @@ void Logger::setup(bool keepMessages) + +@@ -114,6 +133,23 @@ bool Logger::setup(bool keepMessages) #ifdef HAVE_SYSLOG _syslogEnabled = Quassel::isOptionSet("syslog"); @@ -55,9 +57,9 @@ index b37abc29..80cec4b2 100644 #endif _initialized = true; -@@ -147,28 +184,8 @@ void Logger::handleMessage(QtMsgType type, const QString& msg) +@@ -166,28 +202,8 @@ void Logger::handleMessage(QtMsgType type, const QString &msg) - void Logger::handleMessage(LogLevel level, const QString& msg) + void Logger::handleMessage(LogLevel level, const QString &msg) { - QString logString; - @@ -84,18 +86,18 @@ index b37abc29..80cec4b2 100644 + emit messageLogged({QDateTime::currentDateTime(), level, msg}); } - void Logger::onMessageLogged(const LogEntry& message) -@@ -208,7 +225,7 @@ void Logger::outputMessage(const LogEntry& message) + +@@ -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|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 751fa05f..0f8cf820 100644 +index 8c1f2f00..a9a8ab69 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -111,6 +111,7 @@ private: |