/* See the DRL-LICENSE file for this file's software license. */ #include #include "logging.h" FILE *logfile; uint8_t system_loglevel; inline void printlog(const uint8_t level, const char *format, ...) { va_list args; if (system_loglevel <= level) { va_start(args, format); vfprintf(logfile, format, args); va_end(args); } } void flushlog() { fflush(logfile); } int loglevel() { return system_loglevel; }