Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

log4net - usage in a class library

Status
Not open for further replies.

tahirk

Programmer
Oct 24, 2005
47
GB
Hi,

I am currently developing a simple ASP.NET 2.0/C# web application.

I have created a class library where I will store all my business logic and data access, security etc. For the logging I have decided to use log4net as it's readily available and tried and tested.

I am a little confused over how to implement logging in my class library. Reading the api doc I understand you have declare log4net for each class you want to enable logging on however I can't seem to workout where to load in the configuration information for log4net (I have created a basic XML file holding my log4net config information).

Anyone have any pointers for me?

Thanks in advance,

Fz
 
Nevermind, answered my own questions.

Found an much simpler logging tool called NLog ( - very easy to implement (similar to log4net) and much easier to implement across your project from classes to web apps etc.

Adios,

Fz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top