You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
671 B
28 lines
671 B
#ifndef LOGGER_H
|
|
#define LOGGER_H
|
|
|
|
#include <QDebug>
|
|
#include <QFile>
|
|
#include <QHash>
|
|
#include <QUdpSocket>
|
|
|
|
class Logger
|
|
{
|
|
private:
|
|
static QFile* _logFile;
|
|
static QHash<QtMsgType, QString> _logTitles;
|
|
|
|
public:
|
|
Logger(const QString& fileName = "./DefaultHatefLogFile.log");
|
|
~Logger();
|
|
|
|
static void logReceivedData(const QByteArray& msg, const QHostAddress& addr, quint16 port);
|
|
static void logReceivedData(const QString& msg);
|
|
|
|
static void makeStartingLine();
|
|
static void clearLog();
|
|
static void messageOutput(QtMsgType type, const QMessageLogContext& context,
|
|
const QString& msg);
|
|
};
|
|
|
|
#endif //LOGGER_H
|
|
|