hibot/source/log.h

25 lines
394 B
C
Raw Permalink Normal View History

2023-12-15 17:45:27 -05:00
#ifndef LOG_H
#include <stdio.h>
2023-12-17 05:51:31 -05:00
FILE * log_file;
2023-12-15 17:45:27 -05:00
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