logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Debashish <debashish...@yahoo.com>
Subject Re: Conigure log4net for .net dll
Date Wed, 13 Aug 2008 21:35:27 GMT

hi,

This is what i ahve in app.config,  please correct me if i am wrong.

<configuration>
  <configSections>
    <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <log4net>
    <appender name="Class1" type="log4net.Appender.RollingFileAppender">
      <file value="c:\\Log4net.txt" />
      <appenderToFile value="true"></appenderToFile>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%d [%t] %-5p %c - %m%n" />
      </layout>
    </appender>
    <logger name="ClassLibrary1">
      <level value="DEBUG" />
      <maximumFileSize value="256KB" />
      
      <appender-ref ref="application" />
    </logger>
    <root>
      <level value="DEBUG">
        <appender-ref ref="Class1"></appender-ref>
      </level>
    </root>
  </log4net>

</configuration>

Thanks

Debashish wrote:
> 
> Hi 
> I am developing a ClassLibrary in C#(VS2008). 
> I have refernce to log4net.dll. 
> This DLL has only one function which will log a 
> string using log4net. 
> My AssemblyInfo.cs has the following entry: 
> [assembly: log4net.Config.XmlConfigurator()] 
> I use this above dll in a WINForms application. 
> 
> The problem is log4net is not logging any information. 
> 
> Appreciate help.
> 
> 

-- 
View this message in context: http://www.nabble.com/Conigure-log4net-for-.net-dll-tp18969861p18971678.html
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message