From afc8ae69fead4099ac86dcea6aa874f5b1540e29 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 26 Apr 2017 16:21:03 -0400 Subject: [PATCH] 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. --- release-notes.md | 3 +++ src/StardewModdingAPI/Program.cs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/release-notes.md b/release-notes.md index 2f98df0b..dc800704 100644 --- a/release-notes.md +++ b/release-notes.md @@ -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). diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 6e7f9950..18a5c999 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -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); }