From cf383870837748e83b99bf63d36d7a8709743715 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Thu, 15 Feb 2018 23:58:27 -0500 Subject: log mod errors and warnings as the mod (#438) --- src/SMAPI/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SMAPI/Program.cs') diff --git a/src/SMAPI/Program.cs b/src/SMAPI/Program.cs index 7eda9c66..c7da581d 100644 --- a/src/SMAPI/Program.cs +++ b/src/SMAPI/Program.cs @@ -255,7 +255,7 @@ namespace StardewModdingAPI } catch (Exception ex) { - this.Monitor.Log($"The {mod.DisplayName} mod failed during disposal: {ex.GetLogSummary()}.", LogLevel.Warn); + mod.LogAsMod($"Mod failed during disposal: {ex.GetLogSummary()}.", LogLevel.Warn); } } @@ -793,7 +793,7 @@ namespace StardewModdingAPI } catch (Exception ex) { - this.Monitor.Log($"{metadata.DisplayName} failed on entry and might not work correctly. Technical details:\n{ex.GetLogSummary()}", LogLevel.Error); + metadata.LogAsMod($"Mod crashed on entry and might not work correctly. Technical details:\n{ex.GetLogSummary()}", LogLevel.Error); } // get mod API @@ -900,7 +900,7 @@ namespace StardewModdingAPI } catch (Exception ex) { - this.Monitor.Log($"Couldn't read {metadata.DisplayName}'s i18n/{locale}.json file: {ex.GetLogSummary()}"); + metadata.LogAsMod($"Mod's i18n/{locale}.json file couldn't be parsed: {ex.GetLogSummary()}"); } } } -- cgit