diff --git a/src/Nlog.RabbitMQ.Target/LogLine.cs b/src/Nlog.RabbitMQ.Target/LogLine.cs index fc755b8..e2b4fa6 100644 --- a/src/Nlog.RabbitMQ.Target/LogLine.cs +++ b/src/Nlog.RabbitMQ.Target/LogLine.cs @@ -1,29 +1,30 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; +using System; +using System.Collections.Generic; +using Newtonsoft.Json; namespace Nlog.RabbitMQ.Target { public class LogLine { - [JsonPropertyName("@source")] + [JsonProperty("@source")] public string Source { get; set; } - [JsonPropertyName("@timestamp")] + [JsonProperty("@timestamp")] public string TimeStampISO8601 { get; set; } - [JsonPropertyName("@message")] + [JsonProperty("@message")] public string Message { get; set; } - [JsonPropertyName("@fields")] + [JsonProperty("@fields")] public IDictionary Fields { get; set; } - [JsonPropertyName("@tags")] + [JsonProperty("@tags")] public ICollection Tags { get; set; } - [JsonPropertyName("@type")] + [JsonProperty("@type")] public string Type { get; set; } - [JsonPropertyName("level")] + [JsonProperty("level")] public string Level { get; set; } } @@ -71,4 +72,4 @@ public static void AddTag(this LogLine line, string tag) line.Tags.Add(tag); } } -} \ No newline at end of file +}