nlog

_tiny_coder發表於2024-04-14

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      autoReload="true"
      throwConfigExceptions="true"
      internalLogLevel="info"
      internalLogFile="internal-nlog.txt">

  <targets>
    <target xsi:type="File" name="allfile" fileName="logs/nlog-all-${shortdate}.log" />
    <target xsi:type="Console" name="logconsole" />
  </targets>

  <rules>
    <logger name="*" minlevel="Trace" writeTo="allfile" />
    <logger name="*" minlevel="Trace" writeTo="logconsole" />
  </rules>
</nlog>