X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Flogger.h;h=9d80305bb38f19a7953346832e746453e22666a1;hp=8c1f2f003788d1ef7fe71bddaada8fa0c36538b4;hb=6eefdfc697067d184a589fc8a231b16316c09106;hpb=37110ceaa070167b4f40ed449ac9ea130503a792 diff --git a/src/common/logger.h b/src/common/logger.h index 8c1f2f00..9d80305b 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -20,6 +20,8 @@ #pragma once +#include "common-export.h" + #include #include @@ -31,7 +33,7 @@ /** * The Logger class encapsulates the various configured logging backends. */ -class Logger : public QObject +class COMMON_EXPORT Logger : public QObject { Q_OBJECT @@ -61,9 +63,9 @@ public: * and won't store further ones. * * @param keepMessages Whether messages should be kept - * @returns true, if initialization was successful + * @throws ExitException, if command line options are invalid */ - bool setup(bool keepMessages); + void setup(bool keepMessages); /** * Accesses the stores log messages, e.g. for consumption by DebugLogWidget. @@ -72,11 +74,7 @@ public: */ std::vector messages() const; -#if QT_VERSION < 0x050000 - static void messageHandler(QtMsgType type, const char *message); -#else static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message); -#endif /** * Takes the given message with the given log level, formats it and emits the @a messageLogged() signal.