nlog.config 914 B

123456789101112131415161718192021222324
  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="info"
  6. internalLogFile="internal-nlog.txt">
  7. <!-- define various log targets -->
  8. <targets>
  9. <!-- write logs to file -->
  10. <target xsi:type="File" name="allfile" fileName="logs/${shortdate}.log"
  11. layout="${longdate}|${logger}|${uppercase:${level}}|${message} ${exception}" />
  12. <target xsi:type="Null" name="blackhole" />
  13. </targets>
  14. <rules>
  15. <!--All logs, including from Microsoft-->
  16. <logger name="*" minlevel="Debug" writeTo="allfile" />
  17. <!--Skip Microsoft logs and so log only own logs>
  18. <logger name="Microsoft.*" minlevel="Trace" writeTo="blackhole" final="true" />
  19. <logger name="*" minlevel="Trace" writeTo="ownFile-web" /-->
  20. </rules>
  21. </nlog>