Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have following web.config (let me send piece of code from web.config)
XML
<configSections>
   <sectionGroup name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
 </configSections>
   <log4net debug="true">
       <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
           <file value="C:\\TestProj\\TestLog.txt"/>
           <appendToFile value="true"/>
           <rollingStyle value="Size"/>
           <maxSizeRollBackups value="10"/>
           <maximumFileSize value="2KB"/>
           <staticLogFileName value="true"/>
           <layout type="log4net.Layout.PatternLayout">
               <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n"/>
           </layout>
       </appender>
       <root>
           <level value="DEBUG"/>
           <appender-ref ref="RollingLogFileAppender"/>
       </root>
   </log4net>
   <configSections>
and its giving an error
Parser Error Message: Unrecognized configuration section log4net/appender.
Posted
Updated 12-Apr-13 6:34am
v2
Comments
ZurdoDev 12-Apr-13 8:55am    
You would have to read the log4net documentation. The error is saying that you can't put appender under log4net.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900