logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: file appender in web apps
Date Thu, 09 Jun 2005 13:49:54 GMT
I've been using log4net's FileAppender to record debug messages in web
apps for several months and have not noticed any issues. The ideal lock
is Exclusive so the file does not need to be re-opened then closed for
every log message. The lock is released when the app is shut down or it
re-cycles (i.e. you copy files to the /bin directory of your web app or
you change the web.config file). I make a call to LogManager.ShutDown()
in my Application_End() method. Better safe than sorry. Nicko would
know more about details of the shut down process.

--- hbmlists@softhome.net wrote:

> Hi, 
> I am using log4net 1.2.9 and .Net 1.1 
> I am planning to use a file appender to log Debug messages for a web 
> application. Are there any drawbacks/limitations in using file
> appender for  
> a web app given the fact that there will be many concurrent users.
> Also 
> ideally what should be the locking mode? Minimal or Exclusive. If
> Exclusive 
> then when will the lock be released ? 
> Also do I need to explicitly call LogManager.ShutDown() or any other
> methods 
> in the Application_End event? 
> Thanks,
> Hemant

View raw message