Skip to content

Commit 99e7ed0

Browse files
committed
Update README.md
1 parent bf558cc commit 99e7ed0

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
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+

0 commit comments

Comments
 (0)