Charles,
There are a couple of general points I want to bring up regarding your
example.
You should try to call DOMConfigurator.Configure() only once, and if
possible as soon as the application starts. Adding this code to your
Page_Load method is not best practice. The Application_Start method of
the Global.asax is a better place in a web app.
In your config file the <root> element is commented out. I would
recommend always having a <root> element that specifies an appender. I
know that in your case using a <logger> with the correct name has the
same effect, but if you are trying to show people the right way to do it
I would use the <root> element.
Cheers,
Nicko
> -----Original Message-----
> From: Charles Carroll [mailto:charlesmarkcarroll@gmail.com]
> Sent: 03 August 2005 04:09
> To: log4net-user@logging.apache.org
> Subject: What is wrong with Log4Net web.config?
>
> http://www.learnasp.com/freebook/learn/log4net1.aspx
>
> when we run that program it should output to trace.write the
> Log.Info statements.
>
>
|