X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Flogger.h;h=f55590c1c696efc1538f5846f5f1440050ac1693;hb=8f92b3f08df9f4eb8fd243ccec6aa9d4b563ec23;hp=3755abfff9ed41fa0039d625271a5ea23ba105ca;hpb=cc6e7c08709c4e761e2fd9c2e322751015497003;p=quassel.git diff --git a/src/common/logger.h b/src/common/logger.h index 3755abff..f55590c1 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -50,11 +50,18 @@ public: Fatal }; - struct LogEntry + struct COMMON_EXPORT LogEntry { QDateTime timeStamp; LogLevel logLevel; QString message; + + /** + * Gets this log entry in a printable format, with timestamp and log level + * + * @return the log entry, formatted with timestamp and log level + */ + QString toString() const; }; /** @@ -111,6 +118,7 @@ private: std::vector _messages; bool _keepMessages{true}; bool _initialized{false}; + QByteArray _prgname; }; Q_DECLARE_METATYPE(Logger::LogEntry)