In java world you have log4j and a a pretty decent logging framework, is there anything like that for C#/.NET?
NLog is one of the most popular, and one of the best-performing logging frameworks for . NET. Setting up NLog is fairly simple. Developers can use Nuget to download the dependency, then edit the NLog.
Conclusion. Picking between Serilog and NLog is hard since both have a lot of features like structured logging and C# based configuration. We are using Serilog on elmah.io since we are logging to both elmah.io and Elasticsearch. Both sinks work great and are actively maintained.
It is compatible with both the . Net Framework and the . Net Core and supports many layout formats, such as JSON, text, console, and XML. Serilog is easy to set up and use, and it provides a lot of features and flexibility.
Serilog has the concept of Sinks and log4net has appenders. They both cover the same need, just with different naming. Sinks and appenders are available for a lot of different destinations like files, databases, and remote services. As an example, elmah.io provides both a sink for Serilog and an appender for log4net.
log4net would be the obvious answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With