1- using System . Collections . Generic ;
2- using System . Text . Json . Serialization ;
1+ using System ;
2+ using System . Collections . Generic ;
3+ using Newtonsoft . Json ;
34
45namespace Nlog . RabbitMQ . Target
56{
67 public class LogLine
78 {
8- [ JsonPropertyName ( "@source" ) ]
9+ [ JsonProperty ( "@source" ) ]
910 public string Source { get ; set ; }
1011
11- [ JsonPropertyName ( "@timestamp" ) ]
12+ [ JsonProperty ( "@timestamp" ) ]
1213 public string TimeStampISO8601 { get ; set ; }
1314
14- [ JsonPropertyName ( "@message" ) ]
15+ [ JsonProperty ( "@message" ) ]
1516 public string Message { get ; set ; }
1617
17- [ JsonPropertyName ( "@fields" ) ]
18+ [ JsonProperty ( "@fields" ) ]
1819 public IDictionary < string , object > Fields { get ; set ; }
1920
20- [ JsonPropertyName ( "@tags" ) ]
21+ [ JsonProperty ( "@tags" ) ]
2122 public ICollection < string > Tags { get ; set ; }
2223
23- [ JsonPropertyName ( "@type" ) ]
24+ [ JsonProperty ( "@type" ) ]
2425 public string Type { get ; set ; }
2526
26- [ JsonPropertyName ( "level" ) ]
27+ [ JsonProperty ( "level" ) ]
2728 public string Level { get ; set ; }
2829 }
2930
@@ -71,4 +72,4 @@ public static void AddTag(this LogLine line, string tag)
7172 line . Tags . Add ( tag ) ;
7273 }
7374 }
74- }
75+ }
0 commit comments