logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Gustavsen" ...@adwiza.com>
Subject problems with log4net
Date Wed, 16 Nov 2005 13:48:44 GMT
I have included the framework ..
 
config file look like this 

 
<?xml version="1.0" encoding="utf-8" ?>

<configuration>

<configSections>

<section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />

</configSections>

<log4net>

<appender name="A1" type="log4net.Appender.ConsoleAppender">

<!-- A1 uses PatternLayout -->

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%-4timestamp [%thread] %-5level %logger %ndc -
%message%newline" />

</layout>

</appender>

<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">

<param name="File" value="c:\app.log" />

<param name="AppendToFile" value="true" />

<param name="MaxSizeRollBackups" value="10" />

<param name="MaximumFileSize" value="10MB" />

<param name="RollingStyle" value="Size" />

<param name="StaticLogFileName" value="true" />

<layout type="log4net.Layout.PatternLayout">

<param name="Header"
value="\r\n\r\n-------------------------------------------------\r\n" />

<param name="Footer"
value="\r\n-------------------------------------------------\r\n\r\n" />

<param name="ConversionPattern" value="%d [%t] %-5p - %m%n" />

</layout>

</appender>

</log4net> 

</configuration>

 
calling :
BasicConfigurator.Configure();

log.Debug("test");

log.Error("test");

 
but nothing happes,
 
someone have a clue why ? did I forgot something ?
 
 

Mime
View raw message