Browse Source

Don't flush log file, just console output, when logging.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
5d5e63bacd
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/logger.cpp

+ 3
- 1
src/logger.cpp View File

@@ -73,7 +73,9 @@ static void logVa(Level level, const char* filename, int line, const char* func,
std::fprintf(outputFile, "\x1B[0m"); std::fprintf(outputFile, "\x1B[0m");
std::vfprintf(outputFile, format, args); std::vfprintf(outputFile, format, args);
std::fprintf(outputFile, "\n"); std::fprintf(outputFile, "\n");
std::fflush(outputFile);
// Don't flush log file, just console output.
if (outputFile == stderr)
std::fflush(outputFile);
} }


void log(Level level, const char* filename, int line, const char* func, const char* format, ...) { void log(Level level, const char* filename, int line, const char* func, const char* format, ...) {


Loading…
Cancel
Save