Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/Nlog.RabbitMQ.Target/LogLine.cs
Original file line number Diff line number Diff line change
@@ -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<string, object> Fields { get; set; }

[JsonPropertyName("@tags")]
[JsonProperty("@tags")]
public ICollection<string> Tags { get; set; }

[JsonPropertyName("@type")]
[JsonProperty("@type")]
public string Type { get; set; }

[JsonPropertyName("level")]
[JsonProperty("level")]
public string Level { get; set; }
}

Expand Down Expand Up @@ -71,4 +72,4 @@ public static void AddTag(this LogLine line, string tag)
line.Tags.Add(tag);
}
}
}
}
Loading