#include #include #include "log.h" // I know... It is what it is... static LogLevel global_level; void log_init(LogLevel level) { global_level = level; } void log_generic(LogLevel level, const char *format, ...) { if (level < global_level) return; va_list args; va_start(args, format); vfprintf(level >= LOG_WARN ? stderr : stdout, format, args); va_end(args); } // vim: ts=4 sw=4 et