Navigation Menu

Skip to content

Commit

Permalink
Debug: Flush log buffer immediately after printing a message
Browse files Browse the repository at this point in the history
Slows things down a little, but makes sure the messages are in the log
in case of a crash.
  • Loading branch information
skyjake committed May 21, 2012
1 parent 9c6599e commit 8a648eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doomsday/engine/portable/src/con_main.c
Expand Up @@ -1886,6 +1886,9 @@ static void conPrintf(int flags, const char* format, va_list args)
if(consoleDump)
{
LegacyCore_PrintLogFragment(de2LegacyCore, prbuff);
#ifdef _DEBUG
LogBuffer_Flush();
#endif
}
}

Expand Down Expand Up @@ -2021,6 +2024,9 @@ void Con_Message(const char *message, ...)
{
//printf("%s", buffer);
LegacyCore_PrintLogFragment(de2LegacyCore, buffer);
#ifdef _DEBUG
LogBuffer_Flush();
#endif
}

// Also print in the console.
Expand Down

0 comments on commit 8a648eb

Please sign in to comment.