-
Notifications
You must be signed in to change notification settings - Fork 8
/
log4Net.config
38 lines (38 loc) · 1.67 KB
/
log4Net.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="JsonFileAppender" type="log4net.Appender.FileAppender">
<file value="C:\log\siparisLog.json" />
<layout type="Siparis.Core.CrossCuttingCornces.Logging.Log4Net.Layouts.JsonLayout" />
</appender>
<appender name="SqlServerAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="Data Source=DESKTOP-RR7TSTQ\SQLEXPRESS;Initial Catalog=_SiparisTakipDB;Integrated Security=True;" />
<commandText value="INSERT INTO Siparis_Logs ([logDetail],[logLevel]) VALUES (@logDetail,@logLevel)" />
<parameter>
<parameterName value="@logDetail" />
<dbType value="String" />
<size value="4000" />
<layout type="Siparis.Core.Logging.Log4Net.Layouts.JsonLayout" />
</parameter>
<parameter>
<parameterName value="@logLevel" />
<dbType value="String" />
<size value="50" />
<layout type="log4net.Layout.PatternLayout" value="%level" />
</parameter>
</appender>
<logger name="JsonFileLogger">
<level value="ALL" />
<appender-ref ref="JsonFileAppender" />
</logger>
<logger name="DatabaseLogger">
<level value="All" />
<appender-ref ref="SqlServerAppender" />
</logger>
</log4net>
</configuration>