Option to log debug console output to a file. Closes #318

This commit is contained in:
Joonas Rikkonen
2018-04-20 20:11:01 +03:00
parent 177f31d538
commit e61dc5ae5f
5 changed files with 90 additions and 11 deletions
@@ -190,15 +190,16 @@ namespace Barotrauma
sb.AppendLine("Last debug messages:");
for (int i = DebugConsole.Messages.Count - 1; i > 0; i--)
{
sb.AppendLine(" " + DebugConsole.Messages[i].Time + " - " + DebugConsole.Messages[i].Text);
sb.AppendLine("[" + DebugConsole.Messages[i].Time + "] " + DebugConsole.Messages[i].Text);
}
sw.WriteLine(sb.ToString());
sw.Close();
CrashMessageBox( "A crash report (\"crashreport.txt\") was saved in the root folder of the game."+
" If you'd like to help fix this bug, please post the report on the Undertow Games forums.");
if (GameSettings.SaveDebugConsoleLogs) DebugConsole.SaveLogs();
CrashMessageBox( "A crash report (\"crashreport.log\") was saved in the root folder of the game."+
" If you'd like to help fix this bug, please post the report on Barotrauma's GitHub issue tracker: https://github.com/Regalis11/Barotrauma/issues/");
}
}
#endif