Home
Logging
Frog.NET has built-in support for logging of SQL commands based on the log4net framework. Justadd a log4net configuration section to your app.config/web.config file.
1: <?xml version="1.0" encoding="utf-8" ?>
2: <configuration>
3: <configSections>
4: <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
5: </configSections>
6:
7: <log4net debug="true">
8: <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
9: <file value="C:\\temp\\TestLog.txt" />
10: <appendToFile value="true" />
11: <rollingStyle value="Size" />
12: <maxSizeRollBackups value="10" />
13: <maximumFileSize value="10MB" />
14: <staticLogFileName value="true" />
15: <layout type="log4net.Layout.PatternLayout">
16: <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
17: </layout>
18: </appender>
19:
20: <root>
21: <level value="DEBUG" />
22: <appender-ref ref="RollingLogFileAppender" />
23: </root>
24: </log4net>
25: </configuration>
1: Configuration.Initialize("MyApplication.exe.config");
