Customized JSON formatting with Serilog

added by DotNetKicks
6/22/2021 10:39:20 PM

756 Views

TL;DR: Another Serilog Expressions by example post, showing how to produce newline-delimited JSON logs from Serilog events. Newline-delimited JSON is a useful format for structured logs that will be read by other applications. Serilog's built-in JsonFormatter implements this, but to my eyes, its output is awkward and verbose.


0 comments