Created
July 24, 2020 16:29
-
-
Save ssukhpinder/54776c3e09b0f378303c52ce6854fbc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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" | |
internalLogLevel="Info" | |
internalLogFile="c:\temp\internal-nlog.txt"> | |
<!-- enable asp.net core layout renderers --> | |
<extensions> | |
<add assembly="NLog.Web.AspNetCore"/> | |
</extensions> | |
<!-- the targets to write to --> | |
<targets> | |
<!-- write logs to file --> | |
<target xsi:type="File" name="allfile" fileName="c:\temp\nlog-all-${shortdate}.log" | |
layout="${longdate}|${event-properties:item=EventId_Id}|${uppercase:${level}}|${logger}|${message} ${exception:format=tostring}" /> | |
</targets> | |
<!-- rules to map from logger name to target --> | |
<rules> | |
<!--All logs, including from Microsoft--> | |
<logger name="*" minlevel="Trace" writeTo="allfile" /> | |
<!--Skip non-critical Microsoft logs and so log only own logs--> | |
<logger name="Microsoft.*" maxlevel="Info" final="true" /> | |
</rules> | |
</nlog> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment