fix log parse issues

This commit is contained in:
Jesse Plamondon-Willard 2020-03-08 14:38:24 -04:00
parent 5ba53cb390
commit e39b9e0d69
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
3 changed files with 6 additions and 4 deletions

View File

@ -11,8 +11,9 @@
* Mods are no longer prevented from suppressing key presses in the chatbox. Use this power wisely.
* For the web UI:
* Optimized log parser for very long multi-line log messages.
* Added option to upload files using a file picker.
* Optimized log parser for very long multi-line log messages.
* Fixed log parser not detecting folder path in recent versions of SMAPI.
* For SMAPI developers:
* Added internal API to send custom input to the game/mods. This is mainly meant to support Virtual Keyboard on Android, but might be exposed as a public API in future versions.

View File

@ -49,7 +49,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
this.Time = time;
this.Level = level;
this.Mod = mod;
this.Text.AppendLine(text);
this.Text.Append(text);
}
/// <summary>Add a new line to the next log message being built.</summary>
@ -60,7 +60,8 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
if (!this.Started)
throw new InvalidOperationException("Can't add text, no log message started yet.");
this.Text.AppendLine(text);
this.Text.Append("\n");
this.Text.Append(text);
}
/// <summary>Get a log message for the accumulated values.</summary>

View File

@ -201,7 +201,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
}
// mod path line
else if (message.Level == LogLevel.Debug && this.ModPathPattern.IsMatch(message.Text))
else if (message.Level == LogLevel.Info && this.ModPathPattern.IsMatch(message.Text))
{
Match match = this.ModPathPattern.Match(message.Text);
log.ModPath = match.Groups["path"].Value;