|
Multi diag tools
|
#include <Backend.h>
Inheritance diagram for Mdt::ErrorLogger::Backend:Public Slots | |
| virtual void | logError (const Error &error)=0 |
| Log given error. More... | |
Public Member Functions | |
| Backend (QObject *parent=nullptr) | |
| Constructor. | |
| ~Backend () | |
| Destructor. | |
| template<typename T > | |
| void | setFormatEngine () |
| Set the format engine. More... | |
| virtual void | cleanup () |
| Called during end cleanup. More... | |
Protected Member Functions | |
| QString | formatError (const Mdt::Error &error) const |
| Format error to its string representation. More... | |
This class is a interface to create a error logger backend that will be used by error Logger to output errors.
Notice that Logger can be executed from a non main thread, also take care that some functions must at least be reentrant.
|
inlinevirtual |
Called during end cleanup.
This method is called from Logger::cleanup().
Backend can implement this method if requierd.
This default implementation does nothing.
Reimplemented in Mdt::ErrorLogger::FileBackend.
|
protected |
Format error to its string representation.
Will use the format engine set using setFormatEngine().
Definition at line 35 of file Backend.cpp.
|
pure virtualslot |
Log given error.
This method must be reentrant, because it can be called from Logger thread (which is not the main thread).
Implemented in Mdt::ErrorLogger::FileBackend, and Mdt::ErrorLogger::ConsoleBackend.
|
inline |
Set the format engine.
A format engine is a subclass of FormatEngine that outputs a Mdt::Error to its string representation.
1.8.11