Created
September 7, 2019 09:28
-
-
Save alistairjevans/0b0664bae2a13a350964a48c78f2c9b7 to your computer and use it in GitHub Desktop.
Added username
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
<!-- 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} | ${uppercase:${level:padding=5}} | ${mdlc:userName} | ${logger} | ${message} ${exception:format=tostring}" /> | |
<!-- another file log, only own logs. Uses some ASP.NET core renderers --> | |
<target xsi:type="File" name="ownFile-web" fileName="c:\temp\nlog-own-${shortdate}.log" | |
layout="${longdate} | ${uppercase:${level:padding=5}} | ${mdlc:userName} | ${logger} | ${message} ${exception:format=tostring} | url: ${aspnet-request-url} | action: ${aspnet-mvc-action}" /> | |
</targets> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment