No longer suppress console output from the log file

Console messages appear in the console (in developer mode only), but weren't saved to the log file based on the argument that they weren't relevant. However, that also suppresses the game's load-game errors in Stardew Valley 1.2, which makes troubleshooting save issues more complicated. To avoid any such issues in the future, they're now always logged to the file. If you need to log a message that isn't shown to the user, use System.Diagnostics.Debug instead.
This commit is contained in:
Jesse Plamondon-Willard 2017-04-26 16:21:03 -04:00
parent 4ef957c191
commit afc8ae69fe
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,9 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/1.10...1.11).
For players:
* Optimised console logging.
For mod developers:
* `Console.Out` messages are now written to the log file.
## 1.10
See [log](https://github.com/Pathoschild/SMAPI/compare/1.9...1.10).

View File

@ -247,7 +247,6 @@ namespace StardewModdingAPI
// redirect direct console output
{
Monitor monitor = this.GetSecondaryMonitor("Console.Out");
monitor.WriteToFile = false; // not useful for troubleshooting mods per discussion
if (monitor.WriteToConsole)
this.ConsoleManager.OnMessageIntercepted += line => monitor.Log(line, LogLevel.Trace);
}