X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Flogger.h;h=f55590c1c696efc1538f5846f5f1440050ac1693;hb=8f92b3f08df9f4eb8fd243ccec6aa9d4b563ec23;hp=751fa05f8813d07762d19ddfd87eaae11cd1a300;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;p=quassel.git diff --git a/src/common/logger.h b/src/common/logger.h index 751fa05f..f55590c1 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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)