Add new debug log category for saving whatever was sent to console.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9102 4a71c877-e1ca-e34f-864e-861f7616d084
master
Per Inge Mathisen 2010-01-10 14:40:33 +00:00 committed by Git SVN Gateway
parent 357de2a6cb
commit 93f1d85e2d
3 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,7 @@ static const char *code_part_names[] = {
"fatal",
"input",
"popup",
"console",
"last"
};

View File

@ -168,6 +168,7 @@ typedef enum {
LOG_FATAL, /**< special; on by default, for both debug & release builds */
LOG_INPUT, // mouse / keyboard events
LOG_POPUP, // special, on by default, for both debug & release builds (used for OS dependent popup code)
LOG_CONSOLE, // send console messages to file
LOG_LAST /**< _must_ be last! */
} code_part;

View File

@ -236,6 +236,8 @@ static BOOL _addConsoleMessage(const char *messageText, CONSOLE_TEXT_JUSTIFICATI
jusType = defJustification;
}
debug(LOG_CONSOLE, "(to player %d): %s", (int)player, messageText);
consoleStorage[messageIndex].player = player;
/* Precalculate and store (quicker!) the indent for justified text */