Multithread logger class.
More...
#include <LoggerThread.hpp>
|
| LoggerThread (uint32_t _ringBufferSize=32) noexcept |
| Default Constructor.
|
|
| ~LoggerThread () |
|
void | Log (SA::Log _log) override final |
| Push a new log in logger.
|
|
void | ClearStreams (bool _bFlush=true) override final |
|
void | Flush () override final |
| Force logger to flush all streams.
|
|
void | EnableLogLevel (LogLevel _level) override final |
| Enable LogLevel for all registered streams.
|
|
void | DisableLogLevel (LogLevel _level) override final |
| Disable LogLevel for all registered streams.
|
|
void | EnableLogChannel (const std::wstring &_channel) override final |
| Enable LogChannel for all registered streams.
|
|
void | DisableLogChannel (const std::wstring &_channel) override final |
| Disable LogChannel for all registered streams.
|
|
void | IncrementFrameNum () override final |
| Increment current registered frame number.
|
|
uint32_t | GetFrameNum () const override final |
| Get current registered frame number.
|
|
virtual | ~LoggerBase () |
| Destructor Destroy all created log streams.
|
|
template<typename ExcepT > |
void | Assert (ExcepT _exc) |
| Process exception.
|
|
template<typename StreamT , typename... Args> |
StreamT & | CreateSteam (Args &&... _args) |
| Create a new stream to output in.
|
|
template<typename StreamT > |
bool | DestroyStream (StreamT &_stream, bool _bFlush=true) |
| Destroy a previously created stream.
|
|
|
std::list< ALogStream * > | mStreams |
| Registered output streams.
|
|
Multithread logger class.
Create one thread for log output. Push logs in thread-safe queue.
◆ ~LoggerThread()
SA::LoggerThread::~LoggerThread |
( |
| ) |
|
Thread-safe destructor. Flush all remaining logs in streams before join.
◆ ClearStreams()
void SA::LoggerThread::ClearStreams |
( |
bool | _bFlush = true | ) |
|
|
finaloverridevirtual |
Destroy all streams.
- Parameters
-
_bFlush | Should flush stream before destroy. |
Reimplemented from SA::LoggerBase.
◆ DisableLogChannel()
void SA::LoggerThread::DisableLogChannel |
( |
const std::wstring & | _channel | ) |
|
|
finaloverridevirtual |
Disable LogChannel for all registered streams.
- Parameters
-
[in] | _channel | Channel to disable. |
Reimplemented from SA::LoggerBase.
◆ DisableLogLevel()
void SA::LoggerThread::DisableLogLevel |
( |
LogLevel | _level | ) |
|
|
finaloverridevirtual |
Disable LogLevel for all registered streams.
- Parameters
-
[in] | _level | Level to disable. |
Reimplemented from SA::LoggerBase.
◆ EnableLogChannel()
void SA::LoggerThread::EnableLogChannel |
( |
const std::wstring & | _channel | ) |
|
|
finaloverridevirtual |
Enable LogChannel for all registered streams.
- Parameters
-
[in] | _channel | Channel to enable. |
Reimplemented from SA::LoggerBase.
◆ EnableLogLevel()
void SA::LoggerThread::EnableLogLevel |
( |
LogLevel | _level | ) |
|
|
finaloverridevirtual |
Enable LogLevel for all registered streams.
- Parameters
-
[in] | _level | Level to enable. |
Reimplemented from SA::LoggerBase.
◆ Flush()
void SA::LoggerThread::Flush |
( |
| ) |
|
|
finaloverridevirtual |
◆ GetFrameNum()
uint32_t SA::LoggerThread::GetFrameNum |
( |
| ) |
const |
|
finaloverridevirtual |
◆ IncrementFrameNum()
void SA::LoggerThread::IncrementFrameNum |
( |
| ) |
|
|
finaloverridevirtual |
◆ Log()
void SA::LoggerThread::Log |
( |
SA::Log | _log | ) |
|
|
finaloverridevirtual |
Push a new log in logger.
- Parameters
-
Reimplemented from SA::LoggerBase.
The documentation for this class was generated from the following file: