-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnlog.config
More file actions
34 lines (30 loc) · 1.2 KB
/
nlog.config
File metadata and controls
34 lines (30 loc) · 1.2 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
<?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"
throwExceptions="false"
throwConfigExceptions="false"
autoReload="true"
internalLogLevel="Warn"
internalLogFile="C:\temp\BuildRestApiNetCore\RestApi-internal-nlog.txt">
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<targets async="true">
<target xsi:type="File"
name="ownFile-web"
fileName="C:\temp\BuildRestApiNetCore\RestApi-${shortdate}.log">
<layout xsi:type="JsonLayout">
<attribute name="Timestamp" layout="${longdate}" />
<attribute name="Level" layout="${uppercase:${level}}" />
<attribute name="Logger" layout="${logger}" />
<attribute name="Action" layout="${aspnet-mvc-action}" />
<attribute name="Message" layout="${message}" />
<attribute name="Exception" layout="${exception:format=tostring}" />
</layout>
</target>
</targets>
<rules>
<logger name="Microsoft.*" maxlevel="Info" final="true" /> <!-- blackhole -->
<logger name="*" minlevel="Info" writeTo="ownFile-web" />
</rules>
</nlog>