logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Strele Franz" <f.str...@mysynergis.com>
Subject Re: Calling Configure serveral time
Date Thu, 08 Feb 2007 15:21:37 GMT
Hi,

to avoid multiple configuration, you could use code like this:

if(log4net.LogManager.GetRepository().Configured == false)
{
	log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(...));
} 


Hth,
Franz


> -----Urspr√ľngliche Nachricht-----
> Von: news [mailto:news@sea.gmane.org] Im Auftrag von Sergey
> Gesendet: Donnerstag, 08. Februar 2007 11:10
> An: log4net-user@logging.apache.org
> Betreff: Re: Calling Configure serveral time
> 
> Hi,
> 
> Thanks for the answer. Are your plugin class created one time 
> only? If there are several instances of your class created 
> then XmlConfigurator.ConfigureAndWatch method is called 
> several times. Does it work? I wonder if log4net reloads its 
> configuration every time ConfigureAndWatch is called. Does 
> this re-load impact application performance?
> 
> Regards,
> Sergey
> 
> 
> 

Mime
View raw message