util/log, logging: Provide ShouldDebugLog and ShouldTraceLog instead of a generic ShouldLog

This commit is contained in:
Anthony Towns
2026-02-11 11:27:55 +10:00
parent abea304dd6
commit 34332dba2f
3 changed files with 22 additions and 14 deletions

View File

@@ -171,7 +171,7 @@ void ValidationSignals::SyncWithValidationInterfaceQueue()
} while (0)
#define LOG_MSG(fmt, ...) \
(ShouldLog(BCLog::VALIDATION, BCLog::Level::Debug) ? tfm::format((fmt), __VA_ARGS__) : std::string{})
(util::log::ShouldDebugLog(BCLog::VALIDATION) ? tfm::format((fmt), __VA_ARGS__) : std::string{})
#define LOG_EVENT(fmt, ...) \
LogDebug(BCLog::VALIDATION, fmt, __VA_ARGS__)