+ /**
+ * Initial setup, to be called ones command line options are available.
+ *
+ * Sets up the log file if appropriate. Outputs the log messages already accumulated since
+ * construction. If @c keepMessages is false, deletes the accumulated messages afterwards,
+ * and won't store further ones.
+ *
+ * @param keepMessages Whether messages should be kept
+ * @throws ExitException, if command line options are invalid
+ */
+ void setup(bool keepMessages);
+
+ /**
+ * Accesses the stores log messages, e.g. for consumption by DebugLogWidget.
+ *
+ * @returns The accumuates log messages
+ */
+ std::vector<Logger::LogEntry> messages() const;
+
+ static void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
+
+ /**
+ * Takes the given message with the given log level, formats it and emits the @a messageLogged() signal.
+ *
+ * @note This method is thread-safe.
+ *
+ * @param logLevel The log leve of the message
+ * @param message The message
+ */
+ void handleMessage(LogLevel logLevel, const QString &message);