default Monitor.Log to trace

This commit is contained in:
Jesse Plamondon-Willard 2019-03-13 22:20:18 -04:00
parent 99e64eeeb2
commit f238b9f541
No known key found for this signature in database
GPG Key ID: 7D7C8097B62033CE
4 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@ These changes have not been released yet.
* For modders:
* Added `IContentPack.HasFile` method.
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`.
* Dropped support for all deprecated APIs.
* Updated to Json.NET 12.0.1.

View File

@ -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);
}
@ -140,7 +140,7 @@ namespace StardewModdingAPI.Mods.SaveBackup
}
catch (Exception ex)
{
this.Monitor.Log($"Error deleting old save backup '{entry.Name}': {ex}");
this.Monitor.Log($"Error deleting old save backup '{entry.Name}': {ex}", LogLevel.Error);
}
}
}

View File

@ -103,7 +103,7 @@ namespace StardewModdingAPI.Framework
else
{
this.Monitor.Log(message, level);
this.Monitor.Log(warning.StackTrace);
this.Monitor.Log(warning.StackTrace, LogLevel.Debug);
}
}
}

View File

@ -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);
}