fflush(stderr) in case of log buffered after some redirection.

This commit is contained in:
santo 2020-06-19 14:14:17 +00:00
Родитель bd18ec6187
Коммит 2e7a441cb5
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -38,6 +38,7 @@ extern FILE *logfile;
if (MYSQLND_AZURE_G(logOutput) == 1) { \
fprintf(stderr, "[%s] [MYSQLND_AZURE] [%s] " format "\n", timestr, levelstr, \
## __VA_ARGS__); \
fflush(stderr); \
} else if (logfile && MYSQLND_AZURE_G(logOutput) == 2) { \
fprintf(logfile, "[%s] [%s] " format "\n", timestr, levelstr, \
## __VA_ARGS__); \
@ -55,6 +56,7 @@ extern FILE *logfile;
if (MYSQLND_AZURE_G(logOutput) == 1) { \
fprintf(stderr, "[%s] [MYSQLND_AZURE] [SYSTM] " format "\n", timestr, \
## __VA_ARGS__); \
fflush(stderr); \
} else if (logfile && MYSQLND_AZURE_G(logOutput) == 2) { \
fprintf(logfile, "[%s] [SYSTM] " format "\n", timestr, \
## __VA_ARGS__); \