HomeActive Query Builder - HowTos and TroubleshootingActive Query Builder ASP.NET EditionHow to turn on logging?

3.11. How to turn on logging?

Add the following code to your "web.config" file:

	<configuration>
	 <configSections>
	   <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>

and

	<configuration>
	  <log4net>
	   <root>
	     <level value="ALL"/>
	     <appender-ref ref="Logger"/>
	   </root>
	   <appender name="Logger" type="log4net.Appender.RollingFileAppender">
	     <lockingmodel type="log4net.Appender.FileAppender+MinimalLock"/>
	     <file value="Log.txt"/>
	     <appendtofile value="true"/>
	     <rollingstyle value="Size"/>
	     <maxsizerollbackups value="10"/>
	     <maximumfilesize value="100MB"/>
	     <staticlogfilename value="true"/>
	     <filter type="log4net.Filter.LevelMatchFilter">
	       <!-- ALL DEBUG INFO WARN ERROR FATAL OFF -->
	       <level value="ALL"/>
	     </filter>
	     <layout type="log4net.Layout.PatternLayout">
	       <conversionPattern value="%-5p [%d] %m%n"/>
	     </layout>
	   </appender>
	 </log4net>

This page was: Helpful | Not Helpful