-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnlog.config
44 lines (41 loc) · 1.54 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
43
44
<?xml version="1.0" encoding="utf-8" ?>
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
autoReload="true"
internalLogFile="h:\temp\console-example-internal.log"
internalLogLevel="Info"
>
<extensions>
<add assembly="NLog.Sentry.Log" />
<add assembly="Sentry.Log" />
</extensions>
<!-- the targets to write to -->
<targets>
<!-- write logs to file -->
<target
xsi:type="File"
name="logfile"
fileName="logs.txt"
layout="${longdate}|${level}|${message} |${all-event-properties} ${exception:format=tostring}" />
<!-- write logs to console -->
<target
xsi:type="Console"
name="logconsole"
layout="${longdate}|${level}|${message} |${all-event-properties} ${exception:format=tostring}" />
<!-- send logs to sentry -->
<target>
xsi:type="Sentry"
name="sentry"
dsn="https://91d98dc53cb940b7b3a9c2df91a4f8af@o4504962030108672.ingest.sentry.io/4504962283732992"
layout="${longdate}|${level}|${message} |${all-event-properties} ${exception:format=tostring}"
breadcrumbLayout="${logger}: ${message}"
minimumBreadcrumbLevel="Info"
minimumEventLevel="Info">
</target>
</targets>
<!-- rules to map from logger name to target -->
<rules>
<logger name="*" minlevel="Trace" writeTo="sentry,logfile,logconsole" />
</rules>
</nlog>