TreeFrogFramework  2.0
tfileaiologger.h
Go to the documentation of this file.
1 #pragma once
2 #include <QString>
3 #include <TLogger>
4 
5 class TFileAioWriter;
6 
7 
9 public:
11  ~TFileAioLogger();
12 
13  QString key() const { return "FileAioLogger"; }
14  bool isMultiProcessSafe() const { return true; }
15  bool open();
16  void close();
17  bool isOpen() const;
18  void log(const TLog &log);
19  void log(const QByteArray &msg);
20  void flush();
21  void setFileName(const QString &name);
22 
23 private:
24  TFileAioWriter *writer {nullptr};
25 
28 };
29 
TLogger::log
virtual void log(const TLog &log)=0
T_DISABLE_COPY
#define T_DISABLE_COPY(Class)
Definition: tglobal.h:250
TLogger::flush
virtual void flush()
Definition: tlogger.h:22
TLogger
The TLogger class provides an abstract base of logging functionality.
Definition: tlogger.h:11
TLogger::open
virtual bool open()=0
TFileAioLogger
The TFileAioLogger class provides asynchronous logging functionality to a log file.
Definition: tfileaiologger.h:8
TFileAioLogger::key
QString key() const
Definition: tfileaiologger.h:13
TLog
The TLog class contains log messages for web application.
Definition: tlog.h:9
T_DISABLE_MOVE
#define T_DISABLE_MOVE(Class)
Definition: tglobal.h:254
TLogger::isOpen
virtual bool isOpen() const =0
TFileAioLogger::isMultiProcessSafe
bool isMultiProcessSafe() const
Definition: tfileaiologger.h:14
TFileAioWriter
The TFileAioWriter class provides asynchronous writing functionality to a file.
Definition: tfileaiowriter.h:8
TLogger::close
virtual void close()=0
T_CORE_EXPORT
#define T_CORE_EXPORT
Definition: tglobal.h:67