- template<typename T>
- inline Logger &operator<<(const T &value) { _stream << value; return *this; }
- inline Logger &operator<<(const QStringList & t) { _stream << t.join(" "); return *this; }
- inline Logger &operator<<(const char* t) { _stream << QString::fromLocal8Bit(t); return *this; }
- inline Logger &operator<<(bool t) { _stream << (t ? "true" : "false"); return *this; }
+ /**
+ * 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);