#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