base: implement LOG macro which only prints if VERBOSE_LOGS = 1

This allows us to make builds that don't have verbose logging, whether
they're debug or not.

We could have release builds that have verbose logging.
This commit is contained in:
2026-02-05 03:57:33 +00:00
parent 500661d68e
commit 01b695eb6a

View File

@@ -19,6 +19,20 @@
#define FAIL(MSG) assert(false && "FAIL: " #MSG)
#define TODO(MSG) assert(false && "TODO: " #MSG)
#ifndef VERBOSE_LOGS
#define VERBOSE_LOGS 0
#endif
#if VERBOSE_LOGS
#define LOG(...) \
do \
{ \
printf(__VA_ARGS__); \
} while (0)
#else
#define LOG(...)
#endif
/// Numeric aliases
typedef uint8_t u8;
typedef uint16_t u16;