views:

3394

answers:

4

Anyone know of some performance comparisons of the latest version Enterprise Library and the latest version of log4net?

Any technical reason why I should choose one over the other?

+5  A: 

Having used both, I recommend the Enterprise Library for large projects where ease of configuration has higher priority over performance and size.

For everything else, I'd use log4net.

ilitirit
+6  A: 

Log4Net is faster for one - not to mention that you can buffer your log INSERTs. For the logs I don't need to be real-time up to date, I set a buffer of 10k messages.

Log4Net also has more ways to consume the log data - db appenders, event log, rolling file, email, etc, etc.

japollock
Enterprise Library has all those mechanism as well. I'm not sure if it has the buffering though.
spoon16
EL's rolling file listener does not support purging OOTB: http://www.worldolio.com/derek/wordpress/?p=149
frankadelic
A: 

I would go for log4net

c.sokun
I can tell you spent a lot of time on this answer. Unfortunately it still earns you a down vote.
spoon16
As a neophyte - why the downvotes for this answer?
Thorbjørn Ravn Andersen
+3  A: 

I'm asking myself the same question right now, and in looking at the docs for EntLib's logging, i see that it requires references to the following asssemblies (5):
--Microsoft.Practices.Unity.dll
--Microsoft.Practices.Unity.Interception.dll
--Microsoft.Practices.ServiceLocation.dll
--Microsoft.Practices.EnterpriseLibrary.Common.dll
--Microsoft.Practices.EnterpriseLibrary.Logging.dll

On the other hand, log4net requires these assembly references (1):
--log4net.dll

So at least on first glance, log4net is much more lightweight.

jrnail23