CyberEngineMkIII
|
The interface for writing safe logs. More...
#include <Logger.hpp>
Public Types | |
enum | Level : byte { Level::DEV, Level::INFO, Level::WARN, Level::ERR } |
The severity of the log. More... | |
Public Member Functions | |
virtual void | Log (const String::CStyle &AMessage, const Level ALevel)=0 |
Log a message. Will be written to a text file on the Path returned by CurrentLog. More... | |
virtual void | Flush (void) const noexcept=0 |
Delays execution until all pending logs from the current thread have been written to the output. More... | |
virtual const String::CStyle & | CurrentLog (void) const noexcept=0 |
Retrieve the string representation of the Path of the File the Logger is currently writing to. More... | |
virtual void | SetDebugLogging (const bool AEnable) noexcept=0 |
Enable/Disable filtering of Level::DEV logs. More... | |
The interface for writing safe logs.
Definition at line 7 of file Logger.hpp.
|
strong |
The severity of the log.
Enumerator | |
---|---|
DEV |
Debug messages, enabled/disabled by default in engine debug/release builds respectively. |
INFO |
Generic information. |
WARN |
Recoverable warnings. |
ERR |
Hard errors. |
Definition at line 10 of file Logger.hpp.
|
pure virtualnoexcept |
Retrieve the string representation of the Path of the File the Logger is currently writing to.
Implemented in CYB::Engine::Logger, and CYB::Platform::System::Console.
|
pure virtualnoexcept |
Delays execution until all pending logs from the current thread have been written to the output.
Implemented in CYB::Engine::Logger, and CYB::Platform::System::Console.
|
pure virtual |
Log a message. Will be written to a text file on the Path returned by CurrentLog.
AMessage | The message to log |
ALevel | The Level of the message |
CYB::Exception::Violation | Error code: CYB::Exception::Violation::INVALID_ENUM. Thrown if the ALevel is invalid In the near impossible case that the isolated Heap the Logger uses runs out of memory, this function will block and flush the write queue to free space This function may silently fail in the case that the log cannot be written to |
Implemented in CYB::Engine::Logger, and CYB::Platform::System::Console.
|
pure virtualnoexcept |
Enable/Disable filtering of Level::DEV logs.
AEnable | Enables DEV logs if true, disables them otherwise |
Implemented in CYB::Engine::Logger, and CYB::Platform::System::Console.