-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNLog.config
More file actions
35 lines (31 loc) · 1.23 KB
/
NLog.config
File metadata and controls
35 lines (31 loc) · 1.23 KB
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
<?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">
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
<add assembly="NLog.Loki" />
</extensions>
<targets>
<target name="logfile" xsi:type="File" fileName="file.txt" />
<target name="logconsole" xsi:type="Console" />
<target name="loki" xsi:type="loki"
batchSize="200"
taskDelayMilliseconds="500"
endpoint="http://loki:3100"
username=""
password=""
orderWrites="true"
compressionLevel="noCompression"
layout="${level}|${message}${onexception:|${exception:format=type,message,me
thod:maxInnerExceptionLevel=5:innerFormat=shortType,message,method}}|source=
${logger}">
<label name="app" layout="monitoring" />
<label name="server" layout="${hostname:lowercase=true}" />
</target>
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="logconsole" />
<logger name="*" minlevel="Debug" writeTo="logfile" />
<logger name="*" minlevel="Info" writeTo="loki" />
</rules>
</nlog>