Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libutils/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ static void LogToConsole(const char *msg, LogLevel level, bool color)

fprintf(stdout, "%8s: %s\n", LogLevelToString(level), msg);

if (level == LOG_LEVEL_DEBUG)
{
fflush(stdout);
// TODO also possibly call sync()? Not sure if that's too "expensive" or not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think fsync() should be no problem, it's a debug mode after all.

}

if (color)
{
// Turn off the color again.
Expand Down