QLogger
Loading...
Searching...
No Matches
QLogger::BaseLogger Class Referenceabstract
Inheritance diagram for QLogger::BaseLogger:
Collaboration diagram for QLogger::BaseLogger:

Public Member Functions

 BaseLogger (bool enableConsole, QObject *parent=nullptr)
 
void setLevel (QtMsgType idType)
 Use to set minimum level of log message to be managed.
 
void writeLog (const LogBinary &log)
 
virtual void start ()=0
 

Protected Member Functions

virtual void write (const LogBinary &log)=0
 
virtual void flush ()=0
 

Member Function Documentation

◆ setLevel()

void QLogger::BaseLogger::setLevel ( QtMsgType idType)

Use to set minimum level of log message to be managed.

Since Qt log level doesn't use an enum ordered by priority, we use a custom one. Order of priority will be (from low to high):

  • QtDebugMsg
  • QtInfoMsg
  • QtWarningMsg
  • QtCriticalMsg,
  • QtFatalMsg

So, for example, when minimum level is set to QtWarningMsg, only WarningMsg, QtCriticalMsg and QtFatalMsg will be managed

Parameters
[in]idTypeMinimum log level to use

The documentation for this class was generated from the following files: