source: s10k/Vago/logger.h@ 1092

Last change on this file since 1092 was 1047, checked in by s10k, 8 years ago

Added Vago v1.0

File size: 499 bytes
Line 
1#ifndef LOGGER_H
2#define LOGGER_H
3#include <QFile>
4#include <QTextStream>
5#include <QMutex>
6#include <QDateTime>
7#include <memory>
8
9class Logger
10{
11public:
12 Logger(QString appDir, QString logFileName);
13 ~Logger();
14 void writeString(QString strToWrite);
15 void writeBytes(QByteArray arrToWrite);
16private:
17 std::unique_ptr<QFile> myLogFile;
18 std::unique_ptr<QTextStream> logStream;
19 QMutex mutex; //mutex for control writes to the logs
20};
21
22#endif // LOGGER_H
Note: See TracBrowser for help on using the repository browser.