From 2e7a441cb5c2b94ebc69eaaddfe358cc8322791f Mon Sep 17 00:00:00 2001 From: santo Date: Fri, 19 Jun 2020 14:14:17 +0000 Subject: [PATCH] fflush(stderr) in case of log buffered after some redirection. --- utils.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.h b/utils.h index 5bd99f4..41034d4 100644 --- a/utils.h +++ b/utils.h @@ -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__); \