Home -> LogTargetCallback
Declaration
class LogTargetCallback : public ILogTarget;Description
The LogTargetCallback class is an ILogTarget implementation that forwards each received message to a caller-supplied std::function.
This target is useful for tests, application-level log routing, or integration with an existing logging framework.
Warning
When this target is used through LogManager, message strings are supplied in the form expected by the implementation. Direct calls to LogMessage should supply null-terminated scope and message strings.
Important
The callback must remain valid for the lifetime of the target.
Members
Constructors
| Name | Description | |
|---|---|---|
| Constructor |
Creates a callback log target.
|
|
| Create |
Creates a callback log target wrapped in a smart pointer.
|
Lifetime methods
| Name | Description | |
|---|---|---|
| Delete |
Deletes the callback target.
|
Logging methods
| Name | Description | |
|---|---|---|
| LogMessage |
Forwards a message to the callback.
|