I've done this in numerous ASP.NET apps with the setup you described.
Here is your problem: you are specifying both ConfigFileExtension and
ConfigFile. I'm not sure which takes precedence, but log4net is either
looking a file named "site" or "YourAssembly.dll.log4net". From your
description, you h
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.lo
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 (alon
Hi All,
Thanks for all your help. I got the TraceAppender working so I
switched back to FileAppender. Now everything seems to work. I no
longer have any log4net information inside my AssemblyInfo.cs which
seemed to be one of the problems. Also, Geert, I was having a similar
problem like you but no
Let's try getting log4net to produce output...then concentrate on the
FileAppender once we know log4net is working correctly.
Create a log4net.config file in the root of your website (i.e. in the
same folder as web.config):
Make sure the web.config file has tr
Hi Devin,
I am having the same problem for logging in Application_Start and Session_Start.
However all other logging is working fine (in the pages + also in global.asax, but only in Session_End and Application_End)
Regards,
Geert
On 1/31/06, Devin Smith <[EMAIL PROTECTED]> wrote:
Hi,I've spent
Hi Devin!
I was trying to get log4net working on my ASP.NET 2.0 application
yesterday. I am using the Web.Config file instead of a separate config file.
I created a AssemblyInfo.cs inside App_Code. This file contains only one
line:
[assembly: log4net.Config.XmlConfigurator(Watch=true)]
I d
Hi,
I've spent a number of hours trying to get log4net to log something in
an ASP.NET project but have not gotten anywhere. Hopefully someone can
tell me what's going on here.
In the AssemblyInfo.cs file for my main site I have:
[assembly: log4net.Config.Repository("SiteCore")]
[assembly: log4ne