5#ifndef SAPPHIRE_LOGGER_LOGGER_THREAD_GUARD
6#define SAPPHIRE_LOGGER_LOGGER_THREAD_GUARD
38 std::atomic<uint32_t> mFrameNum = 0u;
46 std::atomic<bool> mIsRunning =
true;
58 std::mutex mStreamMutex;
60 void ProcessLog(
const SA::Log& _log,
bool _bForce =
false)
override final;
62 void RegisterStream(
ALogStream* _stream)
override final;
63 bool UnregisterStream(
ALogStream* _stream)
override final;
77 void Log(SA::
Log _log) override final;
LogLevel
All levels of logging.
Definition LogLevel.hpp:26
Logger base class implementation.
Thread-safe RingBuffer class implementation. Multiple producers, single consumer implementation.
Abstract log stream class.
Definition ALogStream.hpp:27
Log type implementation.
Definition Log.hpp:25
Logger base class implementation.
Definition LoggerBase.hpp:29
Multithread logger class.
Definition LoggerThread.hpp:33
void EnableLogLevel(LogLevel _level) override final
Enable LogLevel for all registered streams.
uint32_t GetFrameNum() const override final
Get current registered frame number.
LoggerThread(uint32_t _ringBufferSize=32) noexcept
Default Constructor.
void Flush() override final
Force logger to flush all streams.
void ClearStreams(bool _bFlush=true) override final
void EnableLogChannel(const std::wstring &_channel) override final
Enable LogChannel for all registered streams.
void IncrementFrameNum() override final
Increment current registered frame number.
void DisableLogChannel(const std::wstring &_channel) override final
Disable LogChannel for all registered streams.
void DisableLogLevel(LogLevel _level) override final
Disable LogLevel for all registered streams.
RingBuffer class implementation.
Definition RingBuffer.hpp:31