]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server: flush stdout after logging in both text and json layout (#6253)
authorPierrick Hymbert <redacted>
Sat, 23 Mar 2024 12:18:45 +0000 (13:18 +0100)
committerGitHub <redacted>
Sat, 23 Mar 2024 12:18:45 +0000 (13:18 +0100)
examples/server/utils.hpp

index d7eef556a4632697291ccfcf295b546352deb45d..8f20ff61454e9a2892d17776ba2576531e00a335 100644 (file)
@@ -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);
 }
 
 //