Skip to content

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

License

Notifications You must be signed in to change notification settings

andrewslavin/json-net

 
 

Repository files navigation

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);

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 82.2%
  • PowerShell 17.8%