TreeFrogFramework  1.18
tfileaiologger.h
Go to the documentation of this file.
1 #ifndef TFILEAIOLOGGER_H
2 #define TFILEAIOLOGGER_H
3 
4 #include <QString>
5 #include <TLogger>
6 
7 class TFileAioWriter;
8 
9 
11 {
12 public:
14  ~TFileAioLogger();
15 
16  QString key() const { return "FileAioLogger"; }
17  bool isMultiProcessSafe() const { return true; }
18  bool open();
19  void close();
20  bool isOpen() const;
21  void log(const TLog &log);
22  void log(const QByteArray &msg);
23  void flush();
24  void setFileName(const QString &name);
25 
26 private:
27  TFileAioWriter *writer;
28 
31 };
32 
33 #endif // TFILEAIOLOGGER_H
#define T_CORE_EXPORT
Definition: tglobal.h:81
The TLog class contains log messages for web application.
Definition: tlog.h:11
#define T_DISABLE_COPY(Class)
Definition: tglobal.h:137
#define T_DISABLE_MOVE(Class)
Definition: tglobal.h:141
The TFileAioWriter class provides asynchronous writing functionality to a file.
Definition: tfileaiowriter.h:10
virtual void flush()
Flushes any buffered data to the device.
Definition: tlogger.h:25
virtual void log(const TLog &log)=0
Writes the log log to the device.
virtual bool isOpen() const =0
Returns true if the device is open; otherwise returns false.
bool isMultiProcessSafe() const
Returns true if the implementation is guaranteed to be free of race conditions when accessed by multi...
Definition: tfileaiologger.h:17
The TLogger class provides an abstract base of logging functionality.
Definition: tlogger.h:13
The TFileAioLogger class provides asynchronous logging functionality to a log file.
Definition: tfileaiologger.h:10
QString key() const
Returns a key that this logger plugin supports.
Definition: tfileaiologger.h:16
virtual void close()=0
Closes the device.
virtual bool open()=0
Opens the device for logging.