mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-21 07:56:09 +03:00
28 lines
988 B
XML
28 lines
988 B
XML
<?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"
|
|
autoReload="true">
|
|
|
|
<!-- enable asp.net core layout renderers -->
|
|
<extensions>
|
|
<add assembly="NLog.Web.AspNetCore"/>
|
|
</extensions>
|
|
|
|
<targets>
|
|
<target xsi:type="File" name="allfile" fileName="logs\nlog-all-${date:format=yyyy-MM-dd-HH-mm-ss}.log"
|
|
layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}" />
|
|
|
|
<target name="logconsole" xsi:type="Console" />
|
|
</targets>
|
|
|
|
<!-- rules to map from logger name to target -->
|
|
<rules>
|
|
<!--All logs, including from Microsoft-->
|
|
<logger name="*" minlevel="Trace" writeTo="allfile" />
|
|
<logger name="*" minlevel="Trace" writeTo="logconsole" />
|
|
|
|
<!--Skip non-critical Microsoft logs and so log only own logs-->
|
|
<logger name="Microsoft.*" maxlevel="Info" final="true" />
|
|
</rules>
|
|
</nlog>
|