|
KanoopCommonQt 2.1.1
Kanoop foundational Qt utility library
|
|
A QObject-based sink that receives log entries from the logging system. More...
#include <logconsumer.h>
Inheritance diagram for LogConsumer:
Collaboration diagram for LogConsumer:Signals | |
| void | logEntry (const Log::LogEntry &entry) |
| Emitted when a new log entry is delivered to this consumer. | |
Public Member Functions | |
| LogConsumer (QObject *parent=nullptr) | |
| Construct a LogConsumer with an optional parent. | |
| virtual | ~LogConsumer () |
| Destructor — automatically unregisters from the system logger. | |
| void | addLogEntry (const Log::LogEntry &entry) |
| Deliver a log entry to this consumer, emitting the logEntry() signal. | |
A QObject-based sink that receives log entries from the logging system.
Abstract base class for objects that receive and process log entries.
Subclass LogConsumer and implement the logEntry() signal handler, or connect to the logEntry() signal, to receive all log entries delivered to this consumer. Register the consumer with Log::addConsumer().
Definition at line 20 of file logconsumer.h.
|
explicit |
Construct a LogConsumer with an optional parent.
| parent | Optional QObject parent |
| void LogConsumer::addLogEntry | ( | const Log::LogEntry & | entry | ) |
Deliver a log entry to this consumer, emitting the logEntry() signal.
| entry | Log entry to deliver |
|
signal |
Emitted when a new log entry is delivered to this consumer.
| entry | The delivered log entry |