TreeFrogFramework  2.8
tfilesystemlogger.h
Go to the documentation of this file.
1 #pragma once
2 #include "tsystemlogger.h"
3 #include <QString>
4 #include <QFile>
5 #include <QMutex>
6 #include <TGlobal>
7 
8 
9 class T_CORE_EXPORT TFileSystemLogger : public TSystemLogger {
10 public:
11  TFileSystemLogger(const QString &name = QString());
13 
14  bool open() override;
15  void close() override;
16  bool isOpen() const override;
17  int write(const char *data, int length) override;
18  void flush() override;
19  void setFileName(const QString &name);
20 
21 private:
22  QFile _logFile;
23  QMutex _mutex;
24 
27 };
The TFileSystemLogger class provides writing functionality to a file.
Definition: tfilesystemlogger.h:9
#define T_CORE_EXPORT
Definition: tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition: tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition: tdeclexport.h:41