summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Logging/LogManager.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-28 12:39:37 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-02-28 12:39:37 -0500
commit403616b07c6da6479ce77fd45b41f622e9972915 (patch)
treeaa4cd1eb1f5ffba5f15b7f70226259ae1bb09a21 /src/SMAPI/Framework/Logging/LogManager.cs
parent944c03737e7f7d7788f4321224a4e59a4f04717d (diff)
downloadSMAPI-403616b07c6da6479ce77fd45b41f622e9972915.tar.gz
SMAPI-403616b07c6da6479ce77fd45b41f622e9972915.tar.bz2
SMAPI-403616b07c6da6479ce77fd45b41f622e9972915.zip
fix mods with suppressed warnings counted for showing the log section
Diffstat (limited to 'src/SMAPI/Framework/Logging/LogManager.cs')
-rw-r--r--src/SMAPI/Framework/Logging/LogManager.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs
index 2c7be399..f3656886 100644
--- a/src/SMAPI/Framework/Logging/LogManager.cs
+++ b/src/SMAPI/Framework/Logging/LogManager.cs
@@ -505,7 +505,7 @@ namespace StardewModdingAPI.Framework.Logging
{
this.LogModWarningGroup(
modsWithWarnings,
- match: mod => mod.HasUnsuppressedWarnings(ModWarning.AccessesConsole, ModWarning.AccessesFilesystem, ModWarning.AccessesShell),
+ match: mod => mod.HasWarnings(ModWarning.AccessesConsole, ModWarning.AccessesFilesystem, ModWarning.AccessesShell),
level: LogLevel.Debug,
heading: "Direct system access",
blurb: new[]
@@ -517,11 +517,11 @@ namespace StardewModdingAPI.Framework.Logging
modLabel: mod =>
{
List<string> labels = new List<string>();
- if (mod.HasUnsuppressedWarnings(ModWarning.AccessesConsole))
+ if (mod.HasWarnings(ModWarning.AccessesConsole))
labels.Add("console");
- if (mod.HasUnsuppressedWarnings(ModWarning.AccessesFilesystem))
+ if (mod.HasWarnings(ModWarning.AccessesFilesystem))
labels.Add("files");
- if (mod.HasUnsuppressedWarnings(ModWarning.AccessesShell))
+ if (mod.HasWarnings(ModWarning.AccessesShell))
labels.Add("shells/processes");
return $"{mod.DisplayName} ({string.Join(", ", labels)})";
@@ -582,7 +582,7 @@ namespace StardewModdingAPI.Framework.Logging
/// <param name="blurb">A detailed explanation of the warning, split into lines.</param>
private void LogModWarningGroup(IModMetadata[] mods, ModWarning warning, LogLevel level, string heading, params string[] blurb)
{
- this.LogModWarningGroup(mods, mod => mod.HasUnsuppressedWarnings(warning), level, heading, blurb);
+ this.LogModWarningGroup(mods, mod => mod.HasWarnings(warning), level, heading, blurb);
}