nlog.config 1.3 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
  3. <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. autoReload="true"
  6. internalLogFile="log//log-internal.log"
  7. internalLogLevel="Info" >
  8. <!-- the targets to write to -->
  9. <targets>
  10. <!-- write logs to file -->
  11. <!--${date}|${level:uppercase=true}|${message} ${exception}|${logger}|${all-event-properties}-->
  12. <!--keep this 2 forward slash, it both worked for windows and linux-->
  13. <target name="dynamicPrivateFile" xsi:type="File" enableArchiveFileCompression="true" maxArchiveFiles="20" archiveAboveSize="50000000" archiveNumbering="Sequence"
  14. fileName="log\\${replace:searchFor=DynamicPrivate_:replaceWith=:inner=${logger}}_${date:format=yyyyMMdd}.log"
  15. layout="${date:format=HH\:mm\:ss.fff} [${threadid}:${level:uppercase=true}]${logger} - ${message} ${exception}"/>
  16. <target name="logconsole" xsi:type="Console" />
  17. </targets>
  18. <!-- rules to map from logger name to target -->
  19. <rules>
  20. <logger name="DynamicPrivate_*" minlevel="Debug" writeTo="dynamicPrivateFile" final="true" />
  21. </rules>
  22. </nlog>