logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Quest <christopher.qu...@herbertgroup.com>
Subject Class Library Logging
Date Mon, 03 Apr 2006 15:43:12 GMT
I am using V1.2.0-beta8, on a test .DLL written in C# against .NET1.1 with
the DLL being called from a C# windows application.
I have this attribute in the the Assemblyinfo.cs file:

I am setting up the logger as follows:

private static readonly ILog log =

Then using the logger as normal:

if (log.IsDebugEnabled) log.Debug("Constructor called");

This is my configuration file:

<?xml version="1.0" encoding="utf-8" ?>
        <logger name="UIFeasibility" additivity="false">
                <level value="DEBUG"/>
                <appender-ref ref="FileAppender" />

                <level value="DEBUG" />

        <appender name="FileAppender" type="log4net.Appender.FileAppender">
                <file value="Log-file.txt"/>
                <appendToFile value="true"/>
                <filter type="log4net.Filter.LevelRangeFilter">
                        <levelMin value="INFO"/>
                        <levelMax value="FATAL"/>
                <layout type="log4net.Layout.PatternLayout">
                        <conversionPattern value="%date  %-5level %logger -
%message%newline" />


When the class library is accessed all of the log statments are executed but
after the windows application is closed down there is not text in the log
file even though it is created if it doesn't exists. This mechanism has
perviously worked on a windows service.

View raw message