Hacker News new | ask | show | jobs
by mattmanser 1675 days ago
I still just use System.Diagnostics for debug statements, any left overs are no problems in production code, they don't even get compiled.

I'm interested, what's the advantage for you to using ILogger instead?

2 comments

I use it for structured logging, which makes filtering and searching very convenient. E.g. I can filter by an object’s id and a property to see which tasks change the property of that specific object and in what order. Serilog[0] and Seq[1] are the best tools for this in my opinion.

[0] https://github.com/serilog/serilog

[1] https://datalust.co/seq

Can log to different outputs, such as a remote sink or a file.