NLog.config 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
  5. autoReload="true"
  6. throwExceptions="false"
  7. internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log" >
  8. <!-- optional, add some variabeles
  9. https://github.com/nlog/NLog/wiki/Configuration-file#variables
  10. -->
  11. <variable name="logDirectory" value="${basedir}/Logs/${shortdate}"/>
  12. <!--
  13. See https://github.com/nlog/nlog/wiki/Configuration-file
  14. for information on customizing logging rules and outputs.
  15. -->
  16. <targets>
  17. <!--
  18. add your targets here
  19. See https://github.com/nlog/NLog/wiki/Targets for possible targets.
  20. See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
  21. -->
  22. <!--
  23. Writing events to the a file with the date in the filename.
  24. <target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
  25. layout="${longdate} ${uppercase:${level}} ${message}" />
  26. -->
  27. <target name="logFile" xsi:type="File" fileName="${logDirectory}/LogFile.txt"/>
  28. </targets>
  29. <rules>
  30. <!-- add your logging rules here -->
  31. <!--
  32. Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
  33. <logger name="*" minlevel="Debug" writeTo="f" />
  34. -->
  35. <logger name="*" minlevel="Debug" writeTo="logFile" />
  36. </rules>
  37. </nlog>