summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/LogParsing
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-26 11:22:45 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-26 11:22:45 -0500
commit48bb1581a6adeabfefbdd774011796e09a07aae2 (patch)
tree81fda584e9bad2d95218db9d7cc41146cc10f3ec /src/SMAPI.Web/Framework/LogParsing
parent71284e7176c55f66754470b19fd74b5b1fda4964 (diff)
parent5ac46b7ab22ad5d6ce558a6b6d6d020971c178bd (diff)
downloadSMAPI-48bb1581a6adeabfefbdd774011796e09a07aae2.tar.gz
SMAPI-48bb1581a6adeabfefbdd774011796e09a07aae2.tar.bz2
SMAPI-48bb1581a6adeabfefbdd774011796e09a07aae2.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI.Web/Framework/LogParsing')
-rw-r--r--src/SMAPI.Web/Framework/LogParsing/LogParser.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
index f69d4b6f..84013ccc 100644
--- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
+++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
@@ -42,7 +42,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
private readonly Regex ModUpdateListStartPattern = new Regex(@"^You can update \d+ mods?:$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
/// <summary>A regex pattern matching an entry in SMAPI's mod update list.</summary>
- private readonly Regex ModUpdateListEntryPattern = new Regex(@"^ (?<name>.+?) (?<version>[^\s]+): (?<link>.+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
+ private readonly Regex ModUpdateListEntryPattern = new Regex(@"^ (?<name>.+) (?<version>[^\s]+): (?<link>.+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
/// <summary>A regex pattern matching SMAPI's update line.</summary>
private readonly Regex SmapiUpdatePattern = new Regex(@"^You can update SMAPI to (?<version>[^\s]+): (?<link>.+)$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
@@ -109,12 +109,9 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
if (message.Mod == "SMAPI")
{
// update flags
- if (inModList && !this.ModListEntryPattern.IsMatch(message.Text))
- inModList = false;
- if (inContentPackList && !this.ContentPackListEntryPattern.IsMatch(message.Text))
- inContentPackList = false;
- if (inModUpdateList && !this.ModUpdateListEntryPattern.IsMatch(message.Text))
- inModUpdateList = false;
+ inModList = inModList && message.Level == LogLevel.Info && this.ModListEntryPattern.IsMatch(message.Text);
+ inContentPackList = inContentPackList && message.Level == LogLevel.Info && this.ContentPackListEntryPattern.IsMatch(message.Text);
+ inModUpdateList = inModUpdateList && message.Level == LogLevel.Alert && this.ModUpdateListEntryPattern.IsMatch(message.Text);
// mod list
if (!inModList && message.Level == LogLevel.Info && this.ModListStartPattern.IsMatch(message.Text))