-
Notifications
You must be signed in to change notification settings - Fork 1
/
logger.h
47 lines (43 loc) · 967 Bytes
/
logger.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef LOGGER_H
#define LOGGER_H
#include <QObject>
#include <QMap>
#include <QFile>
#include <QDir>
#include <QTextStream>
#include <QTime>
#include <QDate>
#include <QDebug>
#include "configmanager.h"
enum ErrorStatus{
esNotify = 0,
esMinor = 1,
esWarning = 2,
esCritical = 3,
esFatal = 4
};
class Logger : public QObject
{
Q_OBJECT
private:
QString arrayOfES[5];
QMap<QString, QFile *> m_ListOfLogs;
QDir *m_Dir;
QString m_Path;
QString m_currentLog;
quint8 m_currentDay;
void changeFolder();
public:
explicit Logger(QObject *parent = 0);
~Logger();
signals:
void logMessage(QString &msg);
void addToListOfLogs(QStringList list);
public slots:
void SetSettings(LoggerConfig *p_LoggerConfig);
void StartLogger();
void AddToChannelLog(QString &name, QString &message);
void AddToServerLog(ErrorStatus, QString &message);
void currentLog(QString str);
};
#endif // LOGGER_H