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

Made the logger flush the stream immediately after logging string to file

Ivan Safrin 10 лет назад
Родитель
Сommit
065d104a68
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Core/Contents/Source/PolyLogger.cpp

+ 1 - 0
Core/Contents/Source/PolyLogger.cpp

@@ -75,6 +75,7 @@ void Logger::log(const char *format, ...) {
 		if (Logger::getInstance()->getLogFile()){
 			va_start(args, format);
 			vfprintf(Logger::getInstance()->getLogFile(), format, args);
+            fflush(Logger::getInstance()->getLogFile());
 			va_end(args);
 		} else {
 			time_t t = time(NULL);