-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog4net.config
45 lines (44 loc) · 1.58 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
45
<log4net>
<root>
<level value="INFO" />
<appender-ref ref="console" />
<appender-ref ref="file" />
<appender-ref ref="SmtpAppender"/>
</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">
<file value="c:\logs\myapp.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="100MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %level %logger - %message%newline" />
</layout>
</appender>
<!--
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="[email protected]"/>
<from value="[email protected]"/>
<smtpHost value="smtpout.asia.secureserver.net"/>
<username value="[email protected]"/>
<authentication value="Basic"/>
<subject value="Logging message"/>
<password value="Goyal@123"/>
<port value="80"/>
<bufferSize value="1"/>
<lossy value="true"/>
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="WARN"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline"/>
</layout>
</appender>
-->
</log4net>