hibot/source/log.h
2023-12-17 05:51:31 -05:00

25 lines
394 B
C

#ifndef LOG_H
#include <stdio.h>
FILE * log_file;
static
void log(const char * const message, const char * const color) {
fputs(color, log_file);
fputs(message, log_file);
fputs("\033[0m\n", log_file);
fflush(log_file);
}
void log_notice(const char * const message) {
log("", message);
}
void log_error(const char * const message) {
log("\033[33m", message);
}
#define LOG_H
#endif