Marc, How are you configuring log4net? Programmatically? Or using the DOMConfiguratorAttribute?
Have you tried adding: <add key="log4net.Internal.Debug" value="true"/> To your appSettings block in your Web.config, see: http://logging.apache.org/log4net/release/manual/faq.html#internalDebug As you are trying to get the debug from a service you will probably need to use DebugView from http://www.sysinternals.com. Nicko > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: 26 November 2004 10:50 > To: [email protected] > Subject: ASP.NET and log4net > > > Hi there ... > > I'm trying to use log4net with one of my asp.net > applications. I used log4net for some windows apps already > but I have some problems now ... here my env > > .net framework 1.1 > log4net 1.2.0-beta8 > > I have the following in my web.config: > > <?xml version="1.0" encoding="utf-8" ?> <configuration> > > <configSections> > <section name="log4net" > type="log4net.Config.Log4NetconfigurationSectionHandler,log4ne > t" /> </configSections> > > <!-- This section contains the log4net configuration > settings --> > <log4net debug="true"> > <!-- Define some output appenders --> > <appender name="RollingLogFileAppender" > type="log4net.Appender.RollingFileAppender"> > <param name="File" value="log\\log.txt" /> > <param name="AppendToFile" value="true" /> > <param name="MaxSizeRollBackups" > value="10" /> > <param name="MaximumFileSize" value="5MB" /> > <param name="RollingStyle" value="Size" /> > <param name="StaticLogFileName" > value="true" /> > <layout type="log4net.Layout.PatternLayout"> > <param > name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n" /> > </layout> > </appender> > <!-- Setup the root category, add the > appenders and set the default level --> > <root> > <level value="DEBUG" /> > <appender-ref ref="RollingLogFileAppender" /> > </root> > </log4net> > > this would log into the log directory in my root path of the > asp.net application .. right? This folder exists and aspnet > user has full control on it. > > In the source of the Default.aspx for example I have: > > namespace UniqueIDUserInterface > { > .... > // Create a logger for use in this class > private static readonly log4net.ILog log = > log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetC > urrentMethod().DeclaringType); > > > And in the procedures I use > > log.Error("Erorr blablablabla"); > > this should be correct, yes? > But it does not log anything > > Also I thought that <log4net debug="true"> should enable > internal debugging ... > Somehow I think that all my settings in web.config are not > used .... could that be? > What can I do to debug this problem? > Any ideas? > > > > -- > Freundliche Gr�sse / Kind regards > Eggenberger Marc > Technology Manager > > > > :.________________ > CONFIDENTIALITY : This e-mail and any attachments are > confidential and may be privileged. If you are not a named > recipient, please notify the sender immediately and do not > disclose the contents to another person, use it for any > purpose or store or copy the information in any medium. >
