I haven't used the new beta yet, but I would imagine you could do this as well:
[assembly: log4net.Config.XmlConfigurator()] Whenever the web.config file changes, the application recycles and so does log4net. --- "Micdev42(Yahoo)" <[EMAIL PROTECTED]> wrote: > Erik / Ron, > Thanks: another mystery solved! > Here's my line: > > [assembly: > log4net.Config.DOMConfigurator(ConfigFile="web.config",Watch=true > )] > > Which needs to change to: > > [assembly: > log4net.Config.XmlConfigurator(ConfigFile="web.config",Watch=true > )] > > when using 1.2 beta9. > I've also tracked down where all this is carefully explained in your > documentation. Duhhh... > http://logging.apache.org/log4net/release/manual/configuration.html > > Thanks > Michael > > > -----Original Message----- > From: Burger, Erik [mailto:[EMAIL PROTECTED] > Sent: 28 April 2005 17:42 > To: 'Log4NET User' > Subject: RE: EventLogAppender configured but logger thinks that > logging is > disabled > > This is my line. It works on web.config > > [assembly: log4net.Config.DOMConfigurator(Watch=true)] > > ------------------------------- > Lead Developer > Research and Development Group > GPXS Wireless Ltd. > Southampton, United Kingdom > Phone: +44 (0) 23 8076 2519 > Fax: +44 (0) 23 8076 2555 > Email: [EMAIL PROTECTED] > > > -----Original Message----- > From: Micdev42(Yahoo) [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 28, 2005 5:25 PM > To: 'Log4NET User' > Subject: RE: EventLogAppender configured but logger thinks that > logging is > disabled > > > Should it be this then: > > [assembly: > log4net.Config.DOMConfigurator(ConfigFile="web.config",Watch=true > )] > > ??? > > > -----Original Message----- > From: Burger, Erik [mailto:[EMAIL PROTECTED] > Sent: 28 April 2005 17:22 > To: 'Log4NET User' > Subject: RE: EventLogAppender configured but logger thinks that > logging is > disabled > > It is. The line Ron gave you goes into your AssemblyInfo.cs file (at > least, > that's where I put it). Be sure to add using log4net.Config as well. > > Erik > > ------------------------------- > Lead Developer > Research and Development Group > GPXS Wireless Ltd. > Southampton, United Kingdom > Phone: +44 (0) 23 8076 2519 > Fax: +44 (0) 23 8076 2555 > Email: [EMAIL PROTECTED] > > > -----Original Message----- > From: Micdev42(Yahoo) [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 28, 2005 5:22 PM > To: 'Log4NET User' > Subject: RE: EventLogAppender configured but logger thinks that > logging is > disabled > > > Also, I have all my config in web.config, not a separate file. Is > that OK? > > -----Original Message----- > From: Ron Grabowski [mailto:[EMAIL PROTECTED] > Sent: 28 April 2005 17:11 > To: Log4NET User > Subject: Re: EventLogAppender configured but logger thinks that > logging is > disabled > > Have you told log4net to start logging? > > [assembly: log4net.Config.DOMConfigurator( > ConfigFile="Log4Net.config",Watch=true )] > > --- "Micdev42(Yahoo)" <[EMAIL PROTECTED]> wrote: > > Hello, > > I have an ASP.NET 1.1. application. > > Here is my code: > > > > log4net.ILog log = log4net.LogManager.GetLogger("F2Logger"); > > log.Info("Some meaningful message); > > > > When I look at the log variable, Info is false (as are all the > other > > levels). I've got a project reference to the .NET 1.1 release > > log4net.dll (1.2 beta8). > > > > Here's highlights from my config file: > > > > <configSections> > > <section name="log4net" > > type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" > /> > > </configSections> > > > > <log4net debug="true"> > > <appender name="EventLogAppender" > > type="log4net.Appender.EventLogAppender" > > > <param name="LogName" value="Application" /> > > <param name="ApplicationName" value="F2" /> > > <layout type="log4net.Layout.PatternLayout"> > > <param name="ConversionPattern" value="%d > > [%t] %-5p %c [%x] - %m%n" /> > > </layout> > > </appender> > > > > <root> > > <level value="DEBUG" /> > > </root> > > > > <logger name="F2Logger"> > > <level value="INFO" /> > > <appender-ref ref="EventLogAppender" /> > > </logger> > > </log4net> > > > > > > I've already 'initialised' the event log to permit an application > name > > of F2. In any case, my issue occurs before we try to write to the > > event log. > > > > What am I doing wrong? It all seems so simple... > > Hope you can help. > > > > Regards > > Michael > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: > 27/04/2005 > > > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.10.4 - Release Date: > 27/04/2005 > > > The information transmitted by this e-mail message is intended solely > for > the use of the person to whom or entity to which it is addressed. The > message may contain information that is privileged and confidential. > Disclosure, dissemination, distribution, review, retransmission to, > other > use of or taking any action in reliance upon this information by > anyone > other than the intended recipient is prohibited. If you are not the > intended > recipient, please do not disseminate, distribute or copy this > communication, > by e-mail or otherwise. Instead, please notify us immediately by > return > e-mail (including the original message with your reply) and then > delete and > discard all copies of the message. > > === message truncated ===
