-
Notifications
You must be signed in to change notification settings - Fork 2
/
NLog.config
42 lines (33 loc) · 1.11 KB
/
NLog.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
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<variable name="envdir" value="."/>
<targets>
<target xsi:type="Console"
name="console"
layout="${date:format=yyyy-MM-dd HH\:mm\:ss} ${message}"
/>
<target xsi:type="File"
name="file"
fileName="${var:logdir}\log_${date:format=yyyyMMdd}.txt"
archiveFileName="log_history_{#}.txt"
archiveNumbering="Date"
archiveEvery="Day"
archiveDateFormat="yyyyMMdd"
/>
<target name="mail" xsi:type="Mail" html="true" body="${message}"
subject="QDevOps Error"
to="user2@someemaill.com"
from="user@someemail.com"
smtpUsername="user@someemail.com"
smtpPassword="pa$$word"
smtpAuthentication="Basic"
smtpServer="mail.someemail.com"
smtpPort="25"
/>
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="console" />
<logger name="*" minlevel="Debug" writeTo="file" />
<!--<logger name="*" levels="Error,Fatal" writeTo="mail" />-->
</rules>
</nlog>