SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
LogLevel.hpp
Go to the documentation of this file.
1// Copyright (c) 2023 Sapphire's Suite. All Rights Reserved.
2
3#pragma once
4
5#ifndef SAPPHIRE_LOGGER_LOG_LEVEL_GUARD
6#define SAPPHIRE_LOGGER_LOG_LEVEL_GUARD
7
8#include <string>
9
10#include <SA/Support/Flags.hpp>
11
22namespace SA
23{
25 enum class LogLevel : uint8_t
26 {
28 Normal = (1 << 0),
29
31 Info = (1 << 1),
32
34 Warning = (1 << 2),
35
37 Error = (1 << 3),
38
40 AssertSuccess = (1 << 4),
41
43 AssertFailure = (1 << 5),
44
47
48 Max = uint8_t(-1)
49 };
50
51 SA_DEFINE_ENUM_CLASS_FLAGS(LogLevel);
52
55
56
64 std::string ToString(LogLevel _lvl) noexcept;
65
73 std::wstring ToWString(LogLevel _lvl) noexcept;
74}
75
78#endif // GUARD
std::wstring ToWString(const Log &_log)
ToWString implementation for log.
std::string ToString(LogLevel _lvl) noexcept
ToString implementation for LogLevel.
LogLevel
All levels of logging.
Definition LogLevel.hpp:26
@ Warning
Warning level.
@ Info
Info level.
@ AssertFailure
Assertion Failure level.
@ Default
Default log level (no assert success).
@ AssertSuccess
Assertion Success level.
@ Error
Error level.
@ Normal
Normal level.