Orchard 2.x: Log4Net or NLog?

Topics: Core
Dec 8, 2014 at 1:04 PM
Hello

Now that you guys are rebuilding Orchard 2.x from scratch I would like to open the discussion about if it is convenient to move from Log4Net to NLog.

Initially both libs give similar features: main differences I see is NLog gives support to async logging. I think it is important cause logging is about writting to disk and asynchronous calls for accessing disk improve performance specially in the cloud.

An old discussion I have found in Stack Overflow related with this topic (a bit old): http://stackoverflow.com/questions/710863/log4net-vs-nlog
Developer
Dec 8, 2014 at 1:47 PM
Edited Dec 8, 2014 at 1:49 PM
The implementation I would like to stick to is the one that is out of the box, so neither NLog or Log4Net.

By doing this, you could specify what 3rd party logger to use. At the moment NLog, and Serilog. https://github.com/aspnet/Logging - This is one of the reasons I would like to move away from NHibernate, and that's because it uses Log4Net directly.

Maybe we could create a repo like orchardcms/logging-extensions that have those custom implementations in.
Dec 8, 2014 at 6:44 PM
It sounds great! ;)
Developer
Dec 9, 2014 at 9:08 PM
Logging? Seriously guys, that is the most perfect thing in Orchard that can't be made better :-).

Joke aside, logging is a more involved task than it seems and IMO we'd be foolish to roll out our own. Besides Log4Net is one very popular and you can find appenders for it for basically every logging platform or whatever out there. If it's about logging, it works with Log4Net.
Developer
Dec 9, 2014 at 9:23 PM
Then it needs to work on VNext - so we need to write a Log4Net implementation - no?
Developer
Dec 9, 2014 at 10:01 PM
Isn't it working? AFAIK the Log4Net library is not connected to ASP.NET.
Developer
Dec 10, 2014 at 12:07 AM
Jan 11, 2015 at 10:59 AM
Related with this topic, it is interesting to take into account JSNLog, a logging framework for client side http://www.codeproject.com/Articles/534051/JSNLog-a-new-way-to-do-client-side-logging-integra