Enterprise Logging Block vs NLog vs log4net

imak picture imak · Feb 11, 2011 · Viewed 24.8k times · Source

I need to use a logging library in my project and considering between Enterprise Logging Block vs NLog vs log4net. I found some links on the comparison but most of those are quite old and complaint about things like no new versions of log4net for long etc.

Anyone has suggestion regarding which one is better in terms of ease of use, ease of configuration, performance, scalability etc based on current data.

Answer

W.Gross picture W.Gross · Jan 25, 2012

I just evaluated log4net and NLog for usage in a bigger project. Both have a similar interface and are highly configurable.

NLog seems to be better maintained: An incompatibility of log4net with .Net4 remained unresolved in log4net for quite a long time. Nlog comes with some more 'bells and whistles' like a NuGet Package and a Xml Schema for Visual Studio for editing config files.

In the end we decided for log4net because we measured a much better performance for log4net: A simple test, writing 10000 log messages to a file and to a network log viewer (Log2Console) showed a ten times better performance of log4net! We did no tuning in the config file, file and notwork logger were used with a minimal configuration. You should verify this for yourself with a typical logging setup of your project.