X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Flogger.h;h=6c5c1d0362f539e222483f41bdc6a226974d83b0;hp=751fa05f8813d07762d19ddfd87eaae11cd1a300;hb=097f625c4bd147f4127573ad8ab48555f9dc62d3;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/common/logger.h b/src/common/logger.h index 751fa05f..6c5c1d03 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-2020 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)