You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by Henry Padilla <pa...@hotmail.com> on 2008/11/14 19:04:03 UTC
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.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
RE: configSections getting compiler message.
Posted by Henry Padilla <pa...@hotmail.com>.
I tried that and I still get the schema messages.
Everything works, I just get ~25 messages saying "Could not find schema for..."
Tom P.
Date: Sun, 16 Nov 2008 07:59:03 -0800
From: rongrabowski@yahoo.com
Subject: Re: configSections getting compiler message.
To: log4net-dev@logging.apache.org
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 <pa...@hotmail.com>
To: log4net-dev@logging.apache.org
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.
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live
http://clk.atdmt.com/MRT/go/119462413/direct/01/
Re: configSections getting compiler message.
Posted by Ron Grabowski <ro...@yahoo.com>.
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 <pa...@hotmail.com>
To: log4net-dev@logging.apache.org
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.