If you want to use an Access Database in your App_Data directory for Log4Net, you can use the following...
<!-- *** log4net *** -->
<log4net debug="false">
<appender name="AccessDatabase" type="log4net.Appender.AdoNetAppender">
<connectionString value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DataDirectoryAccess.mdb;"/>
<commandText value="INSERT INTO Log ([Thread],[Level],[Logger],[Message], [Exception]) VALUES (@thread, @log_level, @logger, @message, @exception)"/>
<bufferSize value="1"/>
<parameter>
<parameterName value="@thread"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%thread"/>
</parameter>
<parameter>
<parameterName value="@log_level"/>
<dbType value="String"/>
<size value="50"/>
<layout type="log4net.Layout.PatternLayout" value="%level"/>
</parameter>
<parameter>
<parameterName value="@logger"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%logger"/>
</parameter>
<parameter>
<parameterName value="@message"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout" value="%message"/>
</parameter>
<parameter>
<parameterName value="@exception"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout" value="%exception"/>
</parameter>
</appender>
<root>
<level value="All"/>
<appender-ref ref="AccessDatabase"/>
</root>
</log4net>
Tuesday, July 1, 2008
Subscribe to:
Post Comments (Atom)
Check This Out!
More Links to Good Information
- December (1)
- October (1)
- January (1)
- September (1)
- February (2)
- January (2)
- May (3)
- February (1)
- May (1)
- October (1)
- January (1)
- August (1)
- March (1)
- May (1)
- March (1)
- January (1)
- March (1)
- December (2)
- September (2)
- June (1)
- February (1)
- January (1)
- October (1)
- December (2)
- November (1)
- August (4)
- July (14)
- June (10)
- May (9)
- April (2)
- February (4)
- January (2)
- December (7)
- October (10)
No comments:
Post a Comment