Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 718 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 718 Bytes

Destructurama.JsonNet

Build status

Adds support for logging JSON.NET dynamic types as structured data with Serilog.

Enabling the module:

Install from NuGet:

Install-Package Destructurama.JsonNet

Modify logger configuration:

var log = new LoggerConfiguration()
  .Destructure.JsonNetTypes()
  ...

Logging

Any JSON.NET dynamic object can be represented in the log event's properties:

var obj = JsonConvert.DeserializeObject<dynamic>(someJson);
Log.Information("Deserialized {@Obj}", obj);