c# - Serilog structured data pretty print? -
is there way make serilog format structured data formatted output?
i've been using structured data structures in serilog lately , though there advantage of being compact large data structures (5 properties or more) hard read in console/file without formatting later.
hypothetically i'd enable on dev.
https://github.com/serilog/serilog/wiki/structured-data
from this:
{ "fruit": ["apple", "pear", "orange"] }
to this:
{ "fruit": [ "apple", "pear", "orange" ] }
edit: i'm using jsonconvert.serializeobject({...}, formatting.indented)
i'd move away reasons proper coloring console package, faster serialization, deferred serialization etc.
i seem recall had custom formatter @ work few years ago modify default json output serilog. not remember exact problem had.
you take at, https://github.com/serilog/serilog/wiki/formatting-output, if haven't already
i have started using https://getseq.net/ @ structured output during development, highly recommend it.
Comments
Post a Comment