+ /**
+ * 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);