Call Configure in the Application's Start event (in global.asax) and set an application-wide variable. Then within each page you can set a local variable to the app-wide variable, and within each method just use the page-local variable.
On Tue, 16 Nov 2004 11:43:54 -0500, Benjamin Peikes <[EMAIL PROTECTED]> wrote: > > You should make your loggers static, one for each class. In VB that would be > Shared. That way they only get created once for each class. > > As for calling Configure, I'm not sure where that goes in an ASP.Net > application. > > > Benjamin Peikes > Gargoyle Strategic Investments > 201-227-2209 > > > ________________________________ > From: Dru Sellers [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 16, 2004 11:39 AM > To: 'Log4NET User' > Subject: Logging Perf Hit > > > > > > In my ASP.Net pages I am doing this in about every method > > log4net.Config.DOMConfigurator.Configure(New IO.FileInfo(file)) > Dim log As log4net.ILog = log4net.LogManager.GetLogger(GetType(Verify)) > > Do I need to do this all the time or is there a way to work around this? > > Dru > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.794 / Virus Database: 538 - Release Date: 11/10/2004 > -- Eric Means [EMAIL PROTECTED] http://www.randomtree.org/eric/