diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/daw/logging.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/daw/logging.h b/src/include/daw/logging.h index 65ca827..fb5f887 100644 --- a/src/include/daw/logging.h +++ b/src/include/daw/logging.h @@ -35,21 +35,25 @@ void _log(FILE* stream, const char* prefix, const char* fmt, va_list ap); void LOG(const char* fmt, ...); +// INFO_ skips writing a final newline void INFO_(const char* fmt, ...); void INFO(const char* fmt, ...); +void WARN(const char* fmt, ...); + +void ERROR(const char* fmt, ...); + #ifdef _DEBUG #define DEBUG(fmt, ...) __DEBUG(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__) void __DEBUG(const char* file, const i32 line, const char* func, const char* fmt, ...); + +#define ASSERT(cond) if (!(cond)) { ERROR("ASSERTION FAILED! " #cond); __asm__("int3;"); } #else #define DEBUG(...) +#define ASSERT(...) #endif -void WARN(const char* fmt, ...); - -void ERROR(const char* fmt, ...); - #ifdef __cplusplus } #endif |
