0

When i config log4net,it occurs this:

the reference schema contains error from current document.
The foundation connect has been closed,recieving error!

of this code in:

<log4net xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <appender name="InfoFileAppender" type="log4net.Appender.RollingFileAppender">
            <file value="D:/a.txt" />
            <appendToFile value="true" />
            <param name="DatePattern" value="yyyyMMdd&quot;.txt&quot;" />
            <rollingStyle value="Date" />
            <maxSizeRollBackups value="100" />
            <datePattern value="yyyy-MM-dd'.log'"/>
            <maximumFileSize value="1024KB" />
            <staticLogFileName value="false" />
            <encoding value="utf-8"/>           
            <filter type="log4net.Filter.LevelRangeFilter">    <log4net xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <appender name="InfoFileAppender" type="log4net.Appender.RollingFileAppender">
            <file value="D:/a.txt" />
            <appendToFile value="true" />
            <param name="DatePattern" value="yyyyMMdd&quot;.txt&quot;" />
            <rollingStyle value="Date" />
            <maxSizeRollBackups value="100" />
            <datePattern value="yyyy-MM-dd'.log'"/>
            <maximumFileSize value="1024KB" />
            <staticLogFileName value="false" />
            <encoding value="utf-8"/>           
            <filter type="log4net.Filter.LevelRangeFilter">

in xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" ,what's wrong ?

Dolphin
  • 29,069
  • 61
  • 260
  • 539
  • Have you tried to turn on the internal debugging? http://stackoverflow.com/a/756241/191975 – orjan Dec 11 '13 at 08:32
  • Did you paste the config twice ? Anyway, you are missing the `layout` and it *looks* like you're providing the `datePattern` twice (that's just what I noticed at a glance). I'd ditch it all and restart from the example provided on log4net website for the rollingfileappender... – Alex Dec 11 '13 at 16:07

0 Answers0