logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume JAY <guillaume....@msm-system.Com>
Subject Could not find schema information for the element 'log4net'.
Date Mon, 18 Feb 2008 10:56:13 GMT
Hi,

I'm using Visual studio 2008, targetting .Net Framework 2.0, a C# console
application.

I tried to configure Log4net in the app.config file,  but I got this message
fro mVS 2008 :
Could not find schema information for the element 'log4net'.
and the logging does not work.

I used this solution
http://www.verysimple.com/blog/2007/02/07/could-not-find-schema-information-for-the-element-log4net/

but still, I'd rather use the app.config file. Does anybody has an answer ?

Here is my (very basic) app.config file ;
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net"
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821" />
  </configSections>
  <log4net>
    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="rolling-log.txt" />
      <appendToFile value="true" />
      <maxSizeRollBackups value="1"/>
      <maximumFileSize value="1000KB" />
      <rollingStyle value="Size" />
      <staticLogFileName value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <header value="[Header]&#13;&#10;" />
        <footer value="[Footer]&#13;&#10;" />
        <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline"
/>
        <encoding value="unicodeFFFE" />
      </layout>
    </appender>
    <root>
      <level value="DEBUG" />
      <appender-ref ref="RollingLogFileAppender" />
    </root>
  </log4net>
</configuration>

Thanks for reading !
-- 



Mime
View raw message