NLog.config 1.2 KB

1234567891011121314151617181920212223242526272829
  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. <targets>
  5. <target xsi:type="Mail" name="email" from="system@yupon.com" to="gobrien@yupon.com" smtpServer="mail.yupon.com"
  6. smtpUserName="system@yupon.com" smtpPassword="fix8ed!" smtpAuthentication="Basic"
  7. subject="${machinename}: ${logger} Error Logged"
  8. body="${longdate}|${level:uppercase=true}|${logger}|${callsite}|${message}|${exception}|${stacktrace}" />
  9. <target name="file" xsi:type="File" fileName="${basedir}/logs/${shortdate}-Rocky.log"
  10. layout="${longdate} ${uppercase:${level}} ${message}" />
  11. <target name="debugger" xsi:type="Debugger" layout="${longdate} ${uppercase:${level}} ${message}" />
  12. <!--
  13. <target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
  14. layout="${longdate} ${uppercase:${level}} ${message}" />
  15. -->
  16. </targets>
  17. <rules>
  18. <logger name="*" minlevel="Trace" writeTo="file" />
  19. <logger name="*" minlevel="Trace" writeTo="debugger" />
  20. <logger name="*" minlevel="Error" writeTo="email" />
  21. <!--
  22. <logger name="*" minlevel="Trace" writeTo="f" />
  23. -->
  24. </rules>
  25. </nlog>