summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/release-notes.md5
-rw-r--r--src/SMAPI.Web/Framework/LogParsing/LogParser.cs25
2 files changed, 24 insertions, 6 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 4e4c5dd9..6ce0169a 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,7 +1,7 @@
# Release notes
## 2.8 (upcoming)
* For players:
- * Update checks now work even when the mod has no update keys in most cases.
+ * Update checks now work even for mods without update keys in most cases.
* Reorganised SMAPI files:
* You can now group mods into subfolders to organise them.
* Most SMAPI files are now tucked into a `smapi-internal` subfolder.
@@ -19,6 +19,9 @@
* Fixed some errors logged as SMAPI instead of the affected mod.
* Updated compatibility list.
+* For the web UI:
+ * The log parser now has a separate filter for game messages.
+
* For modders:
* Added [data API](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Data).
* Added `IContentPack.WriteJsonFile` method.
diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
index 013c6c47..f9b5ba76 100644
--- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
+++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
@@ -70,6 +70,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
// parse log messages
LogModInfo smapiMod = new LogModInfo { Name = "SMAPI", Author = "Pathoschild", Description = "" };
+ LogModInfo gameMod = new LogModInfo { Name = "game", Author = "", Description = "" };
IDictionary<string, LogModInfo> mods = new Dictionary<string, LogModInfo>();
bool inModList = false;
bool inContentPackList = false;
@@ -78,10 +79,23 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
// collect stats
if (message.Level == LogLevel.Error)
{
- if (message.Mod == "SMAPI")
- smapiMod.Errors++;
- else if (mods.ContainsKey(message.Mod))
- mods[message.Mod].Errors++;
+ switch (message.Mod)
+ {
+ case "SMAPI":
+ smapiMod.Errors++;
+ break;
+
+ case "game":
+ gameMod.Errors++;
+ break;
+
+ default:
+ {
+ if (mods.ContainsKey(message.Mod))
+ mods[message.Mod].Errors++;
+ break;
+ }
+ }
}
// collect SMAPI metadata
@@ -151,7 +165,8 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
}
// finalise log
- log.Mods = new[] { smapiMod }.Concat(mods.Values.OrderBy(p => p.Name)).ToArray();
+ gameMod.Version = log.GameVersion;
+ log.Mods = new[] { gameMod, smapiMod }.Concat(mods.Values.OrderBy(p => p.Name)).ToArray();
return log;
}
catch (LogParseException ex)