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
>  
> 
> 

Reply via email to