From ea30c450e690513f32398388938b01ab7c8efe3e Mon Sep 17 00:00:00 2001 From: spv Date: Mon, 17 Nov 2025 12:37:33 -0500 Subject: technically functional... --- src/logger.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/logger.h (limited to 'src/logger.h') diff --git a/src/logger.h b/src/logger.h new file mode 100644 index 0000000..4350cf1 --- /dev/null +++ b/src/logger.h @@ -0,0 +1,22 @@ +#ifndef LOGGER_H +#define LOGGER_H + +#include + +enum log_levels { + LOG_ERROR, + LOG_INFO, + LOG_DEBUG, + LOG_INSANEDEBUG, +}; + +#define LOGFP stderr +#define LOGLEVEL + +#define LOG(LEVEL, args...) do { \ + if (LEVEL <= LOG_LEVEL) { \ + fprintf(LOGFP, args); \ + } \ +} while (0) + +#endif -- cgit v1.2.3