Files
amnezia-client/client/debug.h
T

28 lines
520 B
C++
Raw Normal View History

2020-11-23 16:20:25 +03:00
#ifndef DEBUG_H
#define DEBUG_H
2020-12-26 15:03:51 +03:00
#include <QDebug>
#include <QDir>
2020-11-23 16:20:25 +03:00
#include <QFile>
#include <QString>
2020-12-26 15:03:51 +03:00
#include <QTextStream>
2020-11-23 16:20:25 +03:00
class Debug
{
public:
static bool init();
2020-12-16 06:02:22 +03:00
static bool openLogsFolder();
2020-12-26 15:03:51 +03:00
static QString appLogFileNamePath();
2020-11-23 16:20:25 +03:00
private:
2020-12-26 23:17:20 +03:00
static QString userLogsDir();
2020-12-16 06:02:22 +03:00
static QFile m_file;
static QTextStream m_textStream;
static QString m_logFileName;
2020-11-23 16:20:25 +03:00
2020-12-16 06:02:22 +03:00
friend void debugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg);
2020-11-23 16:20:25 +03:00
};
#endif // DEBUG_H