forked from nautilustube/Swagger2Doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNLog.config
More file actions
46 lines (36 loc) · 2.01 KB
/
NLog.config
File metadata and controls
46 lines (36 loc) · 2.01 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
36
37
38
39
40
41
42
43
44
45
46
<?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"
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
autoReload="true"
throwConfigExceptions="true"
throwExceptions="false"
internalLogLevel="info" internalLogFile="${basedir}\log\nlog-internal.log">
<!-- enable asp.net core layout renderers -->
<extensions>
<add assembly="NLog.Web.AspNetCore"/>
</extensions>
<!-- optional, add some variables
https://github.com/nlog/NLog/wiki/Configuration-file#variables
-->
<variable name="app" value="" />
<targets>
<!-- write logs to file -->
<target xsi:type="File" name="Prod" fileName="${basedir}\log\${app}_PROD_${shortdate}.log" maxArchiveDays="60" maxArchiveFiles="60" keepFileOpen="false" concurrentWrites="true"
layout="${MicrosoftConsoleLayout:TimestampFormat=o}" />"<!--Console Target for hosting lifetime messages to improve Docker / Visual Studio startup detection -->
<target xsi:type="File" name="Dev" fileName="${basedir}\log\${app}_DEV_${shortdate}.log" maxArchiveDays="60" maxArchiveFiles="60" keepFileOpen="false" concurrentWrites="true"
layout="${MicrosoftConsoleLayout:TimestampFormat=o}" />"<!--Console Target for hosting lifetime messages to improve Docker / Visual Studio startup detection -->
<target xsi:type="Console" name="lifetimeConsole" layout="${longdate}|${message}" />
</targets>
<rules>
<logger name="*" minlevel="Info" writeTo="lifetimeConsole" />
<!-- add your logging rules here [Trace,Debug,Info,Warn,Error,Fatal] -->
<logger name="System.Net.Http.HttpClient.*" minlevel="Info" final="true" />
<!--All logs, including from Microsoft-->
<logger name="*" minlevel="Trace" writeTo="Dev" />
<!--Skip non-critical Microsoft logs and so log only own logs-->
<logger name="Microsoft.*" maxlevel="Info" final="true" />
<!-- BlackHole without writeTo -->
<logger name="*" minlevel="Info" writeTo="Prod" />
</rules>
</nlog>