mirror of
https://github.com/QuasarApp/SoundBand.git
synced 2025-05-11 22:49:33 +00:00
25 lines
386 B
C
25 lines
386 B
C
|
#ifndef LOG_H
|
||
|
#define LOG_H
|
||
|
|
||
|
#include <QFile>
|
||
|
#include <QTextStream>
|
||
|
#include <QDateTime>
|
||
|
|
||
|
enum LogType{ERROR, WARNING, INFORMATION};
|
||
|
|
||
|
class Log
|
||
|
{
|
||
|
public:
|
||
|
explicit Log(const QString &fileName);
|
||
|
~Log();
|
||
|
void setShowDateTime(bool value);
|
||
|
void write(const QString &value, LogType logType = INFORMATION);
|
||
|
|
||
|
private:
|
||
|
QFile *file;
|
||
|
bool m_showDate;
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif // LOG_H
|