diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-03-13 22:20:18 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-13 15:25:07 -0400 |
commit | 64331ffe8c8cb0fc19878bbf5349299c483f8d9d (patch) | |
tree | c55e601f500d4fab8d82e52c5ac57de394efaf94 | |
parent | 26cac2c12a2b9ae7d486c000406deb2958f5fe30 (diff) | |
download | SMAPI-64331ffe8c8cb0fc19878bbf5349299c483f8d9d.tar.gz SMAPI-64331ffe8c8cb0fc19878bbf5349299c483f8d9d.tar.bz2 SMAPI-64331ffe8c8cb0fc19878bbf5349299c483f8d9d.zip |
default Monitor.Log to trace
-rw-r--r-- | docs/release-notes.md | 3 | ||||
-rw-r--r-- | src/SMAPI.Mods.SaveBackup/ModEntry.cs | 6 | ||||
-rw-r--r-- | src/SMAPI/Framework/DeprecationManager.cs | 2 | ||||
-rw-r--r-- | src/SMAPI/Framework/Monitor.cs | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 0b0bfbbc..1df3aa53 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,6 +5,9 @@ These changes have not been released yet. * For players: * SMAPI now prevents invalid items from breaking menus on hover. +* For modders: + * `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`. + ## 2.11.2 Released 23 April 2019 for Stardew Valley 1.3.36. diff --git a/src/SMAPI.Mods.SaveBackup/ModEntry.cs b/src/SMAPI.Mods.SaveBackup/ModEntry.cs index d10131b3..30dbfbe6 100644 --- a/src/SMAPI.Mods.SaveBackup/ModEntry.cs +++ b/src/SMAPI.Mods.SaveBackup/ModEntry.cs @@ -46,7 +46,7 @@ namespace StardewModdingAPI.Mods.SaveBackup } catch (Exception ex) { - this.Monitor.Log($"Error backing up saves: {ex}"); + this.Monitor.Log($"Error backing up saves: {ex}", LogLevel.Error); } } @@ -87,7 +87,7 @@ namespace StardewModdingAPI.Mods.SaveBackup catch (Exception ex) when (ex is TypeLoadException || ex.InnerException is TypeLoadException) { // create uncompressed backup if compression fails - this.Monitor.Log("Couldn't zip the save backup, creating uncompressed backup instead."); + this.Monitor.Log("Couldn't zip the save backup, creating uncompressed backup instead.", LogLevel.Debug); this.Monitor.Log(ex.ToString(), LogLevel.Trace); this.RecursiveCopy(new DirectoryInfo(Constants.SavesPath), fallbackDir, copyRoot: false); } @@ -137,7 +137,7 @@ namespace StardewModdingAPI.Mods.SaveBackup } catch (Exception ex) { - this.Monitor.Log($"Error deleting old save backup '{file.Name}': {ex}"); + this.Monitor.Log($"Error deleting old save backup '{file.Name}': {ex}", LogLevel.Error); } } } diff --git a/src/SMAPI/Framework/DeprecationManager.cs b/src/SMAPI/Framework/DeprecationManager.cs index 3153bbb4..984bb487 100644 --- a/src/SMAPI/Framework/DeprecationManager.cs +++ b/src/SMAPI/Framework/DeprecationManager.cs @@ -132,7 +132,7 @@ namespace StardewModdingAPI.Framework else { this.Monitor.Log(message, level); - this.Monitor.Log(warning.StackTrace); + this.Monitor.Log(warning.StackTrace, LogLevel.Debug); } } } diff --git a/src/SMAPI/Framework/Monitor.cs b/src/SMAPI/Framework/Monitor.cs index 47ebc2d7..617bfd85 100644 --- a/src/SMAPI/Framework/Monitor.cs +++ b/src/SMAPI/Framework/Monitor.cs @@ -78,7 +78,7 @@ namespace StardewModdingAPI.Framework /// <summary>Log a message for the player or developer.</summary> /// <param name="message">The message to log.</param> /// <param name="level">The log severity level.</param> - public void Log(string message, LogLevel level = LogLevel.Debug) + public void Log(string message, LogLevel level = LogLevel.Trace) { this.LogImpl(this.Source, message, (ConsoleLogLevel)level); } |