ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/logger.h
Revision: 1047
Committed: Fri Sep 16 22:51:26 2016 UTC (9 years ago) by s10k
Content type: text/x-chdr
Original Path: Vago/trunk/Vago/logger.h
File size: 499 byte(s)
Log Message:
Added Vago v1.0

File Contents

# Content
1 #ifndef LOGGER_H
2 #define LOGGER_H
3 #include <QFile>
4 #include <QTextStream>
5 #include <QMutex>
6 #include <QDateTime>
7 #include <memory>
8
9 class Logger
10 {
11 public:
12 Logger(QString appDir, QString logFileName);
13 ~Logger();
14 void writeString(QString strToWrite);
15 void writeBytes(QByteArray arrToWrite);
16 private:
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