diff options
| author | hachem <im@hachem.wtf> | 2026-09-22 06:57:16 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-22 06:57:16 +0200 |
| commit | d7c1ced08d5d78fcb239550404db4e67d4357a19 (patch) | |
| tree | 9c0e218b096d138075cbf6a48e2562d33a8f94ed /src/core/log.h | |
| parent | 270eda6f558c972ec86ad0580f1d3d18afc83a94 (diff) | |
Diffstat (limited to 'src/core/log.h')
| -rw-r--r-- | src/core/log.h | 11 |
1 files changed, 5 insertions, 6 deletions
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__) |
