summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-08 22:48:49 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-11-08 22:48:49 -0500
commit39214fd23f20b8c6d6f4e753e84b87f111ddf083 (patch)
tree17f2e3b2f01ac065708ac627da2c7876be7d1f9a /src/SMAPI/Framework
parenta03137372d8e1aea73da31115d4b47f6656759bc (diff)
downloadSMAPI-39214fd23f20b8c6d6f4e753e84b87f111ddf083.tar.gz
SMAPI-39214fd23f20b8c6d6f4e753e84b87f111ddf083.tar.bz2
SMAPI-39214fd23f20b8c6d6f4e753e84b87f111ddf083.zip
update game log filters (#638)
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/SCore.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs
index bfdf1c51..f7545bd2 100644
--- a/src/SMAPI/Framework/SCore.cs
+++ b/src/SMAPI/Framework/SCore.cs
@@ -86,15 +86,20 @@ namespace StardewModdingAPI.Framework
/// <summary>Whether the program has been disposed.</summary>
private bool IsDisposed;
- /// <summary>Regex patterns which match console messages to suppress from the console and log.</summary>
+ /// <summary>Regex patterns which match console non-error messages to suppress from the console and log.</summary>
private readonly Regex[] SuppressConsolePatterns =
{
new Regex(@"^TextBox\.Selected is now '(?:True|False)'\.$", RegexOptions.Compiled | RegexOptions.CultureInvariant),
new Regex(@"^(?:FRUIT )?TREE: IsClient:(?:True|False) randomOutput: \d+$", RegexOptions.Compiled | RegexOptions.CultureInvariant),
new Regex(@"^loadPreferences\(\); begin", RegexOptions.Compiled | RegexOptions.CultureInvariant),
new Regex(@"^savePreferences\(\); async=", RegexOptions.Compiled | RegexOptions.CultureInvariant),
- new Regex(@"^DebugOutput:\s+(?:added CLOUD|added cricket|dismount tile|Ping|playerPos)", RegexOptions.Compiled | RegexOptions.CultureInvariant),
- new Regex(@"^static SerializableDictionary<.+>\(\) called\.$", RegexOptions.Compiled | RegexOptions.CultureInvariant),
+ new Regex(@"^DebugOutput:\s+(?:added CLOUD|added cricket|dismount tile|Ping|playerPos)", RegexOptions.Compiled | RegexOptions.CultureInvariant)
+ };
+
+ /// <summary>Regex patterns which match console error messages to suppress from the console and log.</summary>
+ private readonly Regex[] SuppressConsoleErrorPatterns =
+ {
+ new Regex(@"^Error loading schedule data for (?:Bouncer|Dwarf|Gunther|Krobus|Marlon|Mister Qi|Sandy|Wizard): .+ ---> System\.IO\.FileNotFoundException", RegexOptions.Compiled | RegexOptions.CultureInvariant)
};
/// <summary>Regex patterns which match console messages to show a more friendly error for.</summary>
@@ -1347,6 +1352,8 @@ namespace StardewModdingAPI.Framework
// ignore suppressed message
if (level != LogLevel.Error && this.SuppressConsolePatterns.Any(p => p.IsMatch(message)))
return;
+ if (level == LogLevel.Error && this.SuppressConsoleErrorPatterns.Any(p => p.IsMatch(message)))
+ return;
// show friendly error if applicable
foreach (var entry in this.ReplaceConsolePatterns)