summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/LogParsing/Models/ParsedLog.cs
blob: 87b20eb0bac3e9e0be0cc2dbddc59095917e3bbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;

namespace StardewModdingAPI.Web.Framework.LogParsing.Models
{
    /// <summary>Parsed metadata for a log.</summary>
    public class ParsedLog
    {
        /*********
        ** Accessors
        *********/
        /****
        ** Metadata
        ****/
        /// <summary>Whether the log file was successfully parsed.</summary>
        public bool IsValid { get; set; }

        /// <summary>An error message indicating why the log file is invalid.</summary>
        public string Error { get; set; }

        /// <summary>The raw log text.</summary>
        public string RawText { get; set; }

        /****
        ** Log data
        ****/
        /// <summary>The SMAPI version.</summary>
        public string ApiVersion { get; set; }

        /// <summary>The game version.</summary>
        public string GameVersion { get; set; }

        /// <summary>The player's operating system.</summary>
        public string OperatingSystem { get; set; }

        /// <summary>The game install path.</summary>
        public string GamePath { get; set; }

        /// <summary>The mod folder path.</summary>
        public string ModPath { get; set; }

        /// <summary>The ISO 8601 timestamp when the log was started.</summary>
        public DateTimeOffset Timestamp { get; set; }

        /// <summary>Metadata about installed mods and content packs.</summary>
        public LogModInfo[] Mods { get; set; } = new LogModInfo[0];

        /// <summary>The log messages.</summary>
        public LogMessage[] Messages { get; set; }
    }
}