Просмотр исходного кода

server: flush stdout after logging in both text and json layout (#6253)

Pierrick Hymbert 1 год назад
Родитель
Сommit
1b26aebe4d
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      examples/server/utils.hpp

+ 1 - 1
examples/server/utils.hpp

@@ -95,8 +95,8 @@ static inline void server_log(const char *level, const char *function, int line,
 
         const std::string str = ss.str();
         printf("%.*s\n", (int)str.size(), str.data());
-        fflush(stdout);
     }
+    fflush(stdout);
 }
 
 //