Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

26 wiersze
1.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. autoReload="true"
  5. internalLogLevel="Warn"
  6. internalLogFile="logs/internal-nlog.txt">
  7. <variable name="myLogLayout"
  8. 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}}" />
  9. <extensions>
  10. <add assembly="NLog.Web.AspNetCore" />
  11. </extensions>
  12. <!-- define various log targets -->
  13. <targets>
  14. <!-- write logs to file -->
  15. <target name="allfile" xsi:type="File" fileName="logs/cap-all-${shortdate}.log"
  16. layout="${myLogLayout}" />
  17. </targets>
  18. <rules>
  19. <!--All logs, including from Microsoft-->
  20. <logger name="*" minlevel="Debug" writeTo="allfile" />
  21. </rules>
  22. </nlog>