datalust / seq-extensions-logging

Add centralized log collection to ASP.NET Core apps with one line of code.
https://datalust.co/seq
Apache License 2.0
86 stars 13 forks source link

Further improvements to Scope property mapping #10

Closed nblumhardt closed 7 years ago

nblumhardt commented 7 years ago

Matches https://github.com/serilog/serilog-extensions-logging/pull/55.

using (_log.BeginScope("Example"))
using (_log.BeginScope(42))
using (_log.BeginScope("Process {OrderId}", 12345))
using (_log.BeginScope(new Dictionary<string, object> { ["MessageId"] = 100 }))
{
    _log.LogInformation("Events in this block have additional properties attached");
}

Generates:

image

(Also took the chance to sneak in a quick fix for JSON formatting of NaN/Infinity values).