using System; using Newtonsoft.Json; namespace Unity.Pipeline.Models { /// /// A single captured Unity console entry, as returned by the console command. /// [Serializable] public class ConsoleLogEntry { /// /// Monotonic sequence number assigned when the entry was captured. Acts as the cursor for /// incremental ("--follow") retrieval: pass the highest seq seen back as the since /// parameter to get only newer entries. Never reused, and increasing for the life of the /// buffer (including across domain reloads, since the buffer is persisted). /// [JsonProperty("seq")] public long Seq { get; set; } /// /// When the entry was captured (UTC). /// [JsonProperty("timestampUtc")] public DateTime TimestampUtc { get; set; } /// /// Normalized severity: "log", "warn", or "error". Unity's Error/Exception/Assert log types /// all map to "error"; Warning maps to "warn"; Log maps to "log". /// [JsonProperty("level")] public string Level { get; set; } /// /// Unity's own name for the entry ("Log", "Warning", /// "Error", "Assert", "Exception"), keeping the distinction that /// collapses. /// [JsonProperty("logType")] public string LogType { get; set; } /// /// The log message text. /// [JsonProperty("message")] public string Message { get; set; } /// /// The stack trace associated with the entry, if any. Empty for most plain logs. /// [JsonProperty("stackTrace")] public string StackTrace { get; set; } /// /// True when the entry was read from the Editor console's own store rather than captured /// live. Its is when it was read, not when it was logged, and /// its position relative to live-captured entries reflects the read, not the original /// chronology. /// [JsonProperty("seeded")] public bool Seeded { get; set; } } }