trbenning / serilog-sinks-xunit

The xunit test output sink for Serilog
MIT License
80 stars 7 forks source link

How about changing the DefaultConsoleOutputTemplate #24

Closed hhko closed 2 years ago

hhko commented 3 years ago

The DefaultConsoleOutputTemplate in serilog-sinks-xunit is "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level}] {Message}{NewLine}{Exception}".

It is different from serilog. The DefaultConsoleOutputTemplate of serilog is "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}".

gitfool commented 3 years ago

@trbenning FWIW, I think this would be a much better default too. It aligns with the well known console default that has a fixed length prefix before the message, regardless of the log level, which makes the log much more readable. Also the year-month-day is just noise in test logs. Hopefully you agree so I sent a PR. 😉