From d7c1ced08d5d78fcb239550404db4e67d4357a19 Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 22 Sep 2026 06:57:16 +0200 Subject: fix: windows support --- src/core/log.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/core/log.h') diff --git a/src/core/log.h b/src/core/log.h index 4237d1c..ca96b26 100644 --- a/src/core/log.h +++ b/src/core/log.h @@ -141,16 +141,15 @@ namespace Donut }; } +// trace/info are debug-only chatter. warnings and errors stay in every build: +// a release build that fails on someone else's machine should still say why. #if defined(DONUT_DEBUG) #define DONUT_TRACE(format, ...) ::Donut::Logger::trace(format __VA_OPT__(,) __VA_ARGS__) #define DONUT_INFO(format, ...) ::Donut::Logger::info(format __VA_OPT__(,) __VA_ARGS__) - #define DONUT_WARN(format, ...) ::Donut::Logger::warn(format __VA_OPT__(,) __VA_ARGS__) - #define DONUT_ERROR(format, ...) ::Donut::Logger::error(format __VA_OPT__(,) __VA_ARGS__) - #define DONUT_FATAL(format, ...) ::Donut::Logger::fatal(format __VA_OPT__(,) __VA_ARGS__) #else #define DONUT_TRACE(format, ...) {} #define DONUT_INFO(format, ...) {} - #define DONUT_WARN(format, ...) {} - #define DONUT_ERROR(format, ...) {} - #define DONUT_FATAL(format, ...) {} #endif +#define DONUT_WARN(format, ...) ::Donut::Logger::warn(format __VA_OPT__(,) __VA_ARGS__) +#define DONUT_ERROR(format, ...) ::Donut::Logger::error(format __VA_OPT__(,) __VA_ARGS__) +#define DONUT_FATAL(format, ...) ::Donut::Logger::fatal(format __VA_OPT__(,) __VA_ARGS__) -- cgit v1.3