|
1234567891011121314151617181920212223242526 |
- <?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="Warn"
- internalLogFile="logs/internal-nlog.txt">
-
- <variable name="myLogLayout"
- value="---------------------------------------------------------------------------${newline}Date:${longdate} Level:${uppercase:${level}} User:${aspnet-user-identity}(${aspnet-request-ip}) Logger:${logger} URL:${aspnet-request-method} ${aspnet-request-url:IncludePort=true:IncludeQueryString=true} Action:${aspnet-mvc-action} ${newline}Message:${message} ${newline}${onexception:Exception:${exception:format=toString}}" />
- <extensions>
- <add assembly="NLog.Web.AspNetCore" />
- </extensions>
-
- <!-- define various log targets -->
- <targets>
- <!-- write logs to file -->
- <target name="allfile" xsi:type="File" fileName="logs/cap-all-${shortdate}.log"
- layout="${myLogLayout}" />
- </targets>
-
- <rules>
- <!--All logs, including from Microsoft-->
- <logger name="*" minlevel="Debug" writeTo="allfile" />
- </rules>
- </nlog>
|