提交 b312261a 编写于 作者: T Timo R 提交者: BtbN

Flush after logging

上级 b9f0da02
......@@ -38,19 +38,23 @@ static void def_log_handler(int log_level, const char *format,
if (log_level <= log_output_level) {
switch (log_level) {
case LOG_DEBUG:
printf("debug: %s\n", out);
fprintf(stdout, "debug: %s\n", out);
fflush(stdout);
break;
case LOG_INFO:
printf("info: %s\n", out);
fprintf(stdout, "info: %s\n", out);
fflush(stdout);
break;
case LOG_WARNING:
printf("warning: %s\n", out);
fprintf(stdout, "warning: %s\n", out);
fflush(stdout);
break;
case LOG_ERROR:
fprintf(stderr, "error: %s\n", out);
fflush(stderr);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册