Log4net will close configured appenders when it shuts down. Log4net will
shutdown if the AppDomain is unloaded, which happens when the
application exits. You do not need to close the appender yourself.

If you want to explicitly shutdown log4net then you can call the
LogManager.Shutdown() method to do this.

Nicko

> -----Original Message-----
> From: Bonio Lopez [mailto:[EMAIL PROTECTED] 
> Sent: 14 June 2005 19:04
> To: 'Log4NET User'
> Subject: Solved- RE: Error with closed appender (More Info)
> 
> Hi,
> I found the problem. In the destructor of helper class the 
> appender was closed. So when GC removed temporary log helper 
> it also killed the appender.
> I have to find out a better sollution.
> Small questions.
> 1.If I use immedeate flush do I MUST to close appender?
> 2.If I don't use immediate flush do I MUST to close appender?
> 3.If I use ExclusiveLock do I Must to close appender?
> 4.If I use MinimalLock do I must to close appender?
> 5. Is appender closed when log4net destructed?
> 
> Thank you for your help very much. For me log4net is a great 
> logging system and very easy to use.
> With best regards,
> Boni
> 
> 

Reply via email to