#ifndef LOGGER_H #define LOGGER_H #include #include #include #include Q_DECLARE_LOGGING_CATEGORY(Application) Q_DECLARE_LOGGING_CATEGORY(Window) class Logging: public QObject { Q_OBJECT public: static void setupLogging(); private: static void logMessageHandler(QtMsgType, const QMessageLogContext &, const QString &); static void rollLogFiles(); private: static qint64 maxFileSize; static int maxBackupFiles; static bool outputToConsole; static bool outputToFile; private: static QString fileName; static QString messagePattern; static QtMessageHandler originalHandler; }; #endif // LOGGER_H