![]() |
Diarkis C++Client Library API Document
|
Class for outputting logs using threads. More...
#include <ThreadedLoggerBackend.h>
Public Member Functions | |
ThreadedLoggerBackend (std::shared_ptr< ILoggerBackend > loggerBackend, bool bDirect=false) | |
Constructor for ThreadedLoggerBackend. More... | |
virtual | ~ThreadedLoggerBackend () |
ThreadedLoggerBackend destructor. More... | |
void | Stop () |
Stop the logging thread. More... | |
Result | Log (const Diarkis::StdString &message, bool includeNewLine=true) override |
Outputs a log of specified messages. More... | |
Class for outputting logs using threads.
ThreadedLoggerBackend::ThreadedLoggerBackend | ( | std::shared_ptr< ILoggerBackend > | loggerBackend, |
bool | bDirect = false |
||
) |
Constructor for ThreadedLoggerBackend.
Create a thread to write logs.
[in] | loggerBackend | Pointer to ILoggerBackend that manages logs to be output |
[in] | bDirect | Whether to output directly without using a thread. This is for debug. |
|
virtual |
ThreadedLoggerBackend destructor.
void ThreadedLoggerBackend::Stop | ( | ) |
Stop the logging thread.
|
overridevirtual |
Outputs a log of specified messages.
[in] | message | Message to log output |
[in] | includeNewLine | Whether to add a new line or not true=include |
Implements ILoggerBackend.