23 [[nodiscard]]
auto level()
const ->
LogLevel {
return level_; }
25 void level(
LogLevel level) { level_ = level; }
27 auto check(
LogLevel msgLevel) ->
bool {
return msgLevel >= level_; }
37void LogStart(
const T& arg)
43void LogArg(
const T& arg)
48template <
typename... Args>
49void LogMessage(Args... args)
51#if __cplusplus >= 201703L
52 (detail::LogArg(args), ...);
53#elif __cplusplus > 201103L
60template <
typename... Args>
61void LogError(Args... args)
67 detail::LogStart(
"[smgl] [error]");
71template <
typename... Args>
72void LogWarning(Args... args)
78 detail::LogStart(
"[smgl] [warning]");
82template <
typename... Args>
83void LogInfo(Args... args)
89 detail::LogStart(
"[smgl] [info]");
93template <
typename... Args>
94void LogDebug(Args... args)
100 detail::LogStart(
"[smgl] [debug]");
Library logging utilities.
Class for constructing and managing the lifetime of a singleton object.
static T & Instance()
Access the singleton instance.
Project top-level namespace.
@ Warning
Warning messages and above.
@ Debug
Debug messages and above.
@ Error
Error messages and above.
@ Info
Info messages and above.