Change output to stdout

This commit is contained in:
2023-11-16 17:06:36 +01:00
parent 3ec6e9ad47
commit 90bef40e70

View File

@@ -60,15 +60,14 @@ static const char *LEVEL_COLORS[] = {
};
static void bzLoggerStdOutCallback(BzLoggerEvent *ev) {
fprintf(stderr, "%s %s%-5s\x1b[0m ",ev->time,
fprintf(stdout, "%s %s%-5s\x1b[0m ",ev->time,
LEVEL_COLORS[ev->level], LEVEL_STRINGS[ev->level]);
if (ev->file) {
fprintf(stderr, "\x1b[90m(%s:%d)\x1b[0m ",
fprintf(stdout, "\x1b[90m(%s:%d)\x1b[0m ",
ev->file, ev->line);
}
vfprintf(stderr, ev->fmt, ev->va);
fprintf(stderr, "\n");
fflush(stderr);
vfprintf(stdout, ev->fmt, ev->va);
fprintf(stdout, "\n");
}
static void bzLoggerFileCallback(BzLoggerEvent *ev) {