Browse Source

flush stdout after every log output

Julius Pfrommer 7 years ago
parent
commit
6e0437e524
1 changed files with 1 additions and 0 deletions
  1. 1 0
      plugins/ua_log_stdout.c

+ 1 - 0
plugins/ua_log_stdout.c

@@ -31,6 +31,7 @@ UA_Log_Stdout(UA_LogLevel level, UA_LogCategory category,
     printf("[%.23s] %s/%s\t", t.data, LogLevelNames[level], LogCategoryNames[category]);
     vprintf(msg, args);
     printf("\n");
+    fflush(stdout);
 #ifdef UA_ENABLE_MULTITHREADING
     pthread_mutex_unlock(&printf_mutex);
 #endif