generated from gottyduke/PluginTemplate
-
Notifications
You must be signed in to change notification settings - Fork 7
Logging
DK edited this page Sep 24, 2023
·
1 revision
Some macro style loggers with spdlog
backend.
TRACE("trace {}", debugVal);
INFO("{} {} {} {}", a, b, c, d);
DEBUG("Important debug info that shows on debug build");
WARN("Generate warnings in log");
ERROR("This will prompt for exit!");
FATAL("This will abort with message.");
ENABLE_DEBUG
// debug logs after here will be printed
DISABLE_DEBUG
// debug logs after here will be omitted
// or change log level manually
DKUtil::Logger::SetLevel(spdlog::level::level_enums);
For fmt syntax, refer to fmtlib syntax.
By default, LOG_PATH
is automatically set up via SFSEAPI
and points to Documents\\My Games\\Starfield\\SFSE\\Logs
. To override this setting, define LOG_PATH
macro with new relative path in PCH.h
before including DKUtil/Logger.hpp
.