File tree Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Expand file tree Collapse file tree 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
- # json-net
2
- Adds support for logging JSON.NET dynamic types as structured data with Serilog
1
+ ### Destructurama.JsonNet
2
+
3
+ [ ![ Build status] ( https://ci.appveyor.com/api/projects/status/mkvloyvlwdbky28r/branch/master?svg=true )] ( https://ci.appveyor.com/project/Destructurama/json-net/branch/master )
4
+
5
+ Adds support for logging JSON.NET dynamic types as structured data with Serilog.
6
+
7
+ #### Enabling the module:
8
+
9
+ Install from NuGet:
10
+
11
+ ``` powershell
12
+ Install-Package Destructurama.JsonNet
13
+ ```
14
+
15
+ Modify logger configuration:
16
+
17
+ ``` csharp
18
+ var log = new LoggerConfiguration ()
19
+ .Destructure .JsonNetTypes ()
20
+ .. .
21
+ ```
22
+
23
+ #### Logging
24
+
25
+ Any JSON .NET dynamic object can be represented in the log event 's properties:
26
+
27
+ ```csharp
28
+ var obj = JsonConvert .DeserializeObject <dynamic >(someJson );
29
+ Log .Information (" Deserialized {@Obj}" );
30
+ ```
31
+
You can’t perform that action at this time.
0 commit comments