SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions
LogLevel.hpp File Reference

Log level enum implementation. More...

#include <string>
#include <SA/Support/Flags.hpp>

Go to the source code of this file.

Typedefs

using SA::LogLvl = LogLevel
 Shortcut alias.
 

Enumerations

enum class  SA::LogLevel : uint8_t {
  Normal = (1 << 0) , Info = (1 << 1) , Warning = (1 << 2) , Error = (1 << 3) ,
  AssertSuccess = (1 << 4) , AssertFailure = (1 << 5) , Default = Normal | Info | Warning | Error | AssertFailure , Max = uint8_t(-1)
}
 All levels of logging. More...
 

Functions

 SA::SA_DEFINE_ENUM_CLASS_FLAGS (LogLevel)
 
std::string SA::ToString (LogLevel _lvl) noexcept
 ToString implementation for LogLevel.
 
std::wstring SA::ToWString (LogLevel _lvl) noexcept
 ToWString implementation for LogLevel.
 

Detailed Description

Log level enum implementation.

Enumeration Type Documentation

◆ LogLevel

enum class SA::LogLevel : uint8_t
strong

All levels of logging.

Enumerator
Normal 

Normal level.

Info 

Info level.

Warning 

Warning level.

Error 

Error level.

AssertSuccess 

Assertion Success level.

AssertFailure 

Assertion Failure level.

Default 

Default log level (no assert success).

Function Documentation

◆ ToString()

std::string SA::ToString ( LogLevel _lvl)
noexcept

ToString implementation for LogLevel.

Parameters
[in]_lvlLevel to convert.
Returns
LogLevel as a string.
Examples
Exception_IsValidTests.cpp.

◆ ToWString()

std::wstring SA::ToWString ( LogLevel _lvl)
noexcept

ToWString implementation for LogLevel.

Parameters
[in]_lvlLevel to convert.
Returns
LogLevel as a wstring.