Hi,
I actually tried to do this but no matter what I could not get it to
work anymore. In my AssemblyInfo.cs I have:
[assembly: log4net.Config.XmlConfigurator(ConfigFile="site",
ConfigFileExtension="log4net", Watch=true)]
Then in the root directory (where all the ASPX files are) I have a
site.log4net file that I changed back to ASP tracklistener.
In one of my pages (inside the page_load) I have:
log4net.ILog log = log4net.LogManager.GetLogger("productinfo1");
log.Info("Page_Load");
Is there any example of an ASP.Net project that has the information in
the AssemblyInfo.cs file?
Thanks,
Devin
On 1/31/06, Matthew Brown <[EMAIL PROTECTED]> wrote:
> If you have an assembly attribute
>
> [assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net",
> Watch=true)]
>
> then there is no need to manually call Configure() later in your code.
> In fact, I would guess that that second call to Configure was the
> problem that prevented any logging (along with having the config file
> in the bin folder rather than the web root - but thats an easy point
> of confusion, considering that .NET treats web apps differently when
> it comes to "the root").
>