diff options
Diffstat (limited to 'src/SMAPI.Web/Framework/LogParsing')
-rw-r--r-- | src/SMAPI.Web/Framework/LogParsing/LogParser.cs | 8 | ||||
-rw-r--r-- | src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs index 385accf0..9e44f163 100644 --- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs +++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs @@ -55,6 +55,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing return new ParsedLog { IsValid = false, + RawText = logText, Error = "The log is empty." }; } @@ -63,7 +64,8 @@ namespace StardewModdingAPI.Web.Framework.LogParsing ParsedLog log = new ParsedLog { IsValid = true, - Messages = this.CollapseRepeats(this.GetMessages(logText)).ToArray(), + RawText = logText, + Messages = this.CollapseRepeats(this.GetMessages(logText)).ToArray() }; // parse log messages @@ -154,7 +156,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing { IsValid = false, Error = ex.Message, - RawTextIfError = logText + RawText = logText }; } catch (Exception ex) @@ -163,7 +165,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing { IsValid = false, Error = $"Parsing the log file failed. Technical details:\n{ex}", - RawTextIfError = logText + RawText = logText }; } } diff --git a/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs b/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs index 31ef2fe1..a82b6a1b 100644 --- a/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs +++ b/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs @@ -17,8 +17,8 @@ namespace StardewModdingAPI.Web.Framework.LogParsing.Models /// <summary>An error message indicating why the log file is invalid.</summary> public string Error { get; set; } - /// <summary>The raw text if <see cref="IsValid"/> is false.</summary> - public string RawTextIfError { get; set; } + /// <summary>The raw log text.</summary> + public string RawText { get; set; } /**** ** Log data |