Search code examples
c#.netlogginglog4netenterprise-library

If Using Enterprise Library, Is log4net better to log with?


For a project we are using Enterprise Library 5, and will be using several of the blocks. I'm inclined to use the Logging application block since its built into this framework. But I do see a lot of recommendations for log4net, so what have people chosen to do and if choosing log4net, why did you choose it over some of the others?

Thanks.


Solution

  • I would probably go with Enterprise Library's logger, as I'd generally prefer one integrated library over using two separate libraries.

    If you were only going to be using the logging block from EntLib, then I would probably choose log4net, but in this case, where you are going to be using EntLib anyway, the advantages of log4net over EntLib are minor enough as to not make them whilewhile to drag in another dependancy.