Files
amnezia-client/service/server/log.h
T

29 lines
515 B
C++
Raw Normal View History

2020-12-26 15:03:51 +03:00
#ifndef LOG_H
#define LOG_H
#include <QDebug>
#include <QFile>
#include <QString>
#include <QTextStream>
class Log
{
public:
2022-01-30 17:35:57 +03:00
static bool init();
static void deinit();
2020-12-26 15:03:51 +03:00
static QString serviceLogFileNamePath();
2022-01-30 17:35:57 +03:00
static void clearLogs();
static void cleanUp();
2020-12-26 15:03:51 +03:00
private:
friend void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg);
static QFile m_file;
static QString m_logFileName;
static QTextStream m_textStream;
};
#endif // LOG_H