You're using a RollingFileAppender but you're telling the root logger to use a 
ConsoleAppender. Change the code to this:

<appender-ref ref="RollingFileAppender" />




________________________________
From: Henry Padilla <[EMAIL PROTECTED]>
To: [email protected]
Sent: Friday, November 14, 2008 1:04:03 PM
Subject: configSections getting compiler message.

 I'm trying to use this in VS2005 .NET v2.0. I need to set the config up in the 
App.config but I'm getting messages:

"Could not find schema information for the element 'log4net'."
"Could not find schema information for the element 'appender'."

...and so forth. I'm using the configSections example from the site and I can't 
find anything wrong:

    <configSections>
        <section name="log4net" 
type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
    </configSections>
    <log4net>
        <appender name="RollingFileAppender" 
type="log4net.Appender.RollingFileAppender">
            <file value="log.txt" />
            <appendToFile value="true" />
            <rollingStyle value="Size" />
            <maxSizeRollBackups value="10" />
            <maximumFileSize value="100KB" />
            <staticLogFileName value="true" />
            <layout type="log4net.Layout.PatternLayout">
                <conversionPattern value="%date [%thread] %-5level %logger 
[%property{NDC}] - %message%newline" />
            </layout>
        </appender>

        <root>
            <level value="INFO" />
            <appender-ref ref="ConsoleAppender" />
        </root>
    </log4net>

What am I doing wrong? Am I doing anything wrong or do I simply ignore the 
messages?

Thanks for the help.
Tom P.
________________________________
Windows Live Hotmail now works up to 70% faster. Sign up today.

Reply via email to