Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4Net or Logging Application Block [closed]

I need a logging framework in my application. I have two candidates: Log4Net and Logging from Application Block. Which is better? any specific advantage to any of them?

Thanks

like image 417
Ragoler Avatar asked Nov 04 '08 21:11

Ragoler


People also ask

Is log4j and log4net same?

log4net is a port of the excellent Apache log4j™ framework to the Microsoft® . NET runtime. We have kept the framework similar in spirit to the original log4j while taking advantage of new features in the . NET runtime.

How do I completely disable all logging at runtime?

How do I completely disable all logging at runtime? Setting the Threshold on the Hierarchy to Level OFF will disable all logging from that Hierarchy. This can be done in the log4net configuration file by setting the "threshold" attribute on the log4net configuration element to "OFF".

What is Apache log4net used for?

log4net is a tool to help the programmer output log statements to a variety of output targets. In case of problems with an application, it is helpful to enable logging so that the problem can be located. With log4net it is possible to enable logging at runtime without modifying the application binary.

What is log4net DLL?

dll in Solution. Log4net is an open-source project based on the work of many authors. It allows the developer to control what log statements are output with arbitrary granularity. It is fully configurable at runtime using external configuration files.


1 Answers

I have found Log4Net to be simpler to setup and use. The problem with Enterprise Library application blocks is they tend to include everything and the kitchen sink and can make something seemingly simple (like logging) into something really complicated. Also because Log4Net is used with nHibernate which I also use then I already have it there ready to go.

like image 152
Craig Avatar answered Oct 02 '22 13:10

Craig