mirror of
https://github.com/KjellKod/g3log.git
synced 2025-04-16 06:56:41 +02:00
...
This commit is contained in:
parent
e558d3baed
commit
f3388a66df
@ -76,8 +76,10 @@ The code is given for free as public domain. This gives the option to change, us
|
|||||||
The *std::string* comes pre-formatted. The *g2::LogMessageMover* is a wrapped struct that contains the raw data for custom handling in your own sink.
|
The *std::string* comes pre-formatted. The *g2::LogMessageMover* is a wrapped struct that contains the raw data for custom handling in your own sink.
|
||||||
|
|
||||||
A sink is *owned* by the G3log and is added to the logger inside a ```std::unique_ptr```. The sink can be called though its public API through a *handler* which will asynchronously forward the call to the receiving sink.
|
A sink is *owned* by the G3log and is added to the logger inside a ```std::unique_ptr```. The sink can be called though its public API through a *handler* which will asynchronously forward the call to the receiving sink.
|
||||||
```auto sinkHandle = logworker->addSink(std2::make_unique<CustomSink>(),
|
```
|
||||||
&CustomSink::ReceiveLogMessage);```
|
auto sinkHandle = logworker->addSink(std2::make_unique<CustomSink>(),
|
||||||
|
&CustomSink::ReceiveLogMessage);
|
||||||
|
```
|
||||||
|
|
||||||
Example usage where a custom sink is added. A function is called though the sink handler to the actual sink object.
|
Example usage where a custom sink is added. A function is called though the sink handler to the actual sink object.
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user