-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlog4net.config
36 lines (36 loc) · 1.42 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
<log4net>
<root>
<level value="ALL" />
<!--<appender-ref ref="console" />-->
<appender-ref ref="file" />
</root>
<appender name="console" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level %logger - %message%newline" />
</layout>
</appender>
<appender name="file" type="log4net.Appender.RollingFileAppender">
<!--Filename prefix with relative or absolute path-->
<file value=".\Logs\Log" />
<!--Append to the file i.e no overwritten-->
<appendToFile value="true" />
<!--Composite, support for both RollingStyle.Date & RollingStyle.Size-->
<rollingStyle value="Composite" />
<!--Always roll once per day-->
<datePattern value="'_'yyyyMMdd'.log'" />
<!--Also roll if size exceeds max size-->
<maximumFileSize value="300MB"/>
<!--Infinite backups i.e no deletion-->
<maxSizeRollBackups value="-1"/>
<!--Positive count direction, eg: log.1 is the first backup, log.5 is the most recent-->
<CountDirection value="1"/>
<!--Preserve filename extension-->
<preserveLogFileNameExtension value="true" />
<!--True if file name is static-->
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
<threshold value="INFO" />
</appender>
</log4net>