Skip to content

Macros

MacroLevel
TRACEtrace, enabled on debug builds
DEBUGdebug, enabled on debug builds
INFOinfo, enabled on all builds
WARNwarn, enabled on all builds
ERRORerr, message box pop-up, returnable
FATALcritical, message box pop-up, halts process

Logging Level

To change the current logging level, use Logger::SetLevel:

cpp
DKUtil::Logger::SetLevel(spdlog::level::level_enums);

Convenient switches for disabling/enabling all DEBUG macros:

cpp
ENABLE_DEBUG
// debug logs from here will be printed
DISABLE_DEBUG
// debug logs from here will be omitted

Formatting

DKUtil::Logger uses spdlog as backend, thus powered by fmt, for detailed syntax, refer to fmtlib syntax.

cpp
INFO("{} - {} = {}", 10, 5, 10 - 5);
INFO("addr: {:X}", &pointer);

Released under the MIT License