forked from boldreports/aspnet-core-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log4net.config
44 lines (42 loc) · 1.97 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
39
40
41
42
43
44
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<log4net threshold="ALL">
<!-- === Appender for NON-ERROR messages file === -->
<appender name="DEBUG_APPENDER" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="%property{LogPath}\\logs\\samples-debug.log" />
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<appendToFile value="true" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="5MB" />
<rollingStyle value="Size" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<header type="log4net.Util.PatternString" value="#Software: Bold Reports %newline#Date: %date %newline#Fields: date thread namespace methodname message exception%newline" />
<conversionPattern value="%date [%thread] %-5level %message%newline" />
</layout>
</appender>
<!-- === Appender for ERROR messages file === -->
<appender name="ERROR_APPENDER" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="%property{LogPath}\\logs\\samples-error.log" />
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="ERROR" />
</filter>
<appendToFile value="true" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="5MB" />
<rollingStyle value="Size" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<header type="log4net.Util.PatternString" value="#Software: Bold Reports %newline#Date: %date %newline#Fields: date thread namespace methodname message exception%newline" />
<conversionPattern value="%date [%thread] %-5level %message%newline" />
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="DEBUG_APPENDER"/>
<appender-ref ref="ERROR_APPENDER"/>
</root>
</log4net>
</configuration>