fix unspecified log levels
This commit is contained in:
parent
86a1049395
commit
9e521091fe
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using StardewModdingAPI.Events;
|
|
||||||
using StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands;
|
using StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands;
|
||||||
|
|
||||||
namespace StardewModdingAPI.Mods.ConsoleCommands
|
namespace StardewModdingAPI.Mods.ConsoleCommands
|
||||||
|
|
|
@ -160,7 +160,7 @@ namespace StardewModdingAPI.Framework
|
||||||
|
|
||||||
// init logging
|
// init logging
|
||||||
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)}", LogLevel.Info);
|
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)}", LogLevel.Info);
|
||||||
this.Monitor.Log($"Mods go here: {modsPath}");
|
this.Monitor.Log($"Mods go here: {modsPath}", LogLevel.Info);
|
||||||
if (modsPath != Constants.DefaultModsPath)
|
if (modsPath != Constants.DefaultModsPath)
|
||||||
this.Monitor.Log("(Using custom --mods-path argument.)", LogLevel.Trace);
|
this.Monitor.Log("(Using custom --mods-path argument.)", LogLevel.Trace);
|
||||||
this.Monitor.Log($"Log started at {DateTime.UtcNow:s} UTC", LogLevel.Trace);
|
this.Monitor.Log($"Log started at {DateTime.UtcNow:s} UTC", LogLevel.Trace);
|
||||||
|
@ -244,7 +244,7 @@ namespace StardewModdingAPI.Framework
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.Monitor.Log($"SMAPI failed trying to track the crash details: {ex.GetLogSummary()}");
|
this.Monitor.Log($"SMAPI failed trying to track the crash details: {ex.GetLogSummary()}", LogLevel.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.GameInstance.Exit();
|
this.GameInstance.Exit();
|
||||||
|
@ -566,7 +566,7 @@ namespace StardewModdingAPI.Framework
|
||||||
if (latestStable == null && response.Errors.Any())
|
if (latestStable == null && response.Errors.Any())
|
||||||
{
|
{
|
||||||
this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you may not be notified of new versions if this keeps happening.", LogLevel.Warn);
|
this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you may not be notified of new versions if this keeps happening.", LogLevel.Warn);
|
||||||
this.Monitor.Log($"Error: {string.Join("\n", response.Errors)}");
|
this.Monitor.Log($"Error: {string.Join("\n", response.Errors)}", LogLevel.Trace);
|
||||||
}
|
}
|
||||||
else if (this.IsValidUpdate(Constants.ApiVersion, latestBeta, this.Settings.UseBetaChannel))
|
else if (this.IsValidUpdate(Constants.ApiVersion, latestBeta, this.Settings.UseBetaChannel))
|
||||||
{
|
{
|
||||||
|
@ -586,7 +586,7 @@ namespace StardewModdingAPI.Framework
|
||||||
this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you won't be notified of new versions if this keeps happening.", LogLevel.Warn);
|
this.Monitor.Log("Couldn't check for a new version of SMAPI. This won't affect your game, but you won't be notified of new versions if this keeps happening.", LogLevel.Warn);
|
||||||
this.Monitor.Log(ex is WebException && ex.InnerException == null
|
this.Monitor.Log(ex is WebException && ex.InnerException == null
|
||||||
? $"Error: {ex.Message}"
|
? $"Error: {ex.Message}"
|
||||||
: $"Error: {ex.GetLogSummary()}"
|
: $"Error: {ex.GetLogSummary()}", LogLevel.Trace
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ namespace StardewModdingAPI.Framework
|
||||||
this.Monitor.Log("Couldn't check for new mod versions. This won't affect your game, but you won't be notified of mod updates if this keeps happening.", LogLevel.Warn);
|
this.Monitor.Log("Couldn't check for new mod versions. This won't affect your game, but you won't be notified of mod updates if this keeps happening.", LogLevel.Warn);
|
||||||
this.Monitor.Log(ex is WebException && ex.InnerException == null
|
this.Monitor.Log(ex is WebException && ex.InnerException == null
|
||||||
? ex.Message
|
? ex.Message
|
||||||
: ex.ToString()
|
: ex.ToString(), LogLevel.Trace
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue