fix log parser failing for logs with dot-delimited time formats
This commit is contained in:
parent
77f85a701a
commit
7d755da3e2
|
@ -9,6 +9,7 @@ These changes have not been released yet.
|
|||
|
||||
* For the web UI:
|
||||
* When filtering the mod list, clicking a mod link now automatically adds it to the visible mods.
|
||||
* Fixed log parser failing in some cases due to time format localisation.
|
||||
|
||||
* For modders:
|
||||
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`.
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
|
|||
** Fields
|
||||
*********/
|
||||
/// <summary>A regex pattern matching the start of a SMAPI message.</summary>
|
||||
private readonly Regex MessageHeaderPattern = new Regex(@"^\[(?<time>\d\d:\d\d:\d\d) (?<level>[a-z]+) +(?<modName>[^\]]+)\] ", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private readonly Regex MessageHeaderPattern = new Regex(@"^\[(?<time>\d\d[:\.]\d\d[:\.]\d\d) (?<level>[a-z]+) +(?<modName>[^\]]+)\] ", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
/// <summary>A regex pattern matching SMAPI's initial platform info message.</summary>
|
||||
private readonly Regex InfoLinePattern = new Regex(@"^SMAPI (?<apiVersion>.+) with Stardew Valley (?<gameVersion>.+) on (?<os>.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
|
Loading…
Reference in New Issue