<?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">

  <!-- 
  See http://nlog-project.org/wiki/Configuration_file 
  for information on customizing logging rules and outputs.
   -->
  <!-- add your targets here -->
  <targets>
    <default-wrapper xsi:type="AsyncWrapper" batchSize="1000" overflowAction="Grow" timeToSleepBetweenBatches="1"/>

    <target type="FallbackGroup" name="FusionLogging" returnToFirstOnSuccess="true">
      <target type="File" name="FileBackup" fileName="${specialFolder:CommonApplicationData}/Raytheon/logs/${shortdate}/${logger}.log" layout="${longdate} | ${logger} | ${message} ${exception}"/>
      <target type="File" name="LocalFileBackup" fileName="${basedir}/logs/${shortdate}/${logger}.log" layout="${longdate} | ${logger} | ${message} ${exception}"/>
    </target>

    <target name="logDashboard" type="Chainsaw" address="udp://127.0.0.1:7777" />

    <target xsi:type="File" name="logFiles" fileName="${specialfolder:folder=CommonApplicationData}/Raytheon/logs/${shortdate}/${logger:fsNormalize=true}.log" layout="${log4jxmlevent}" />
    <target xsi:type="File" name="RunFile" filename="${specialfolder:folder=CommonApplicationData}/Raytheon/logs/${shortdate}/_All.log" layout="${log4jxmlevent}" />

    <target name="console" type="ColoredConsole" layout="${longdate} | ${logger} | ${message} ${exception}"/>
    
    <target name="blackHole" xsi:type="Null" />

  </targets>

  <!-- add your logging rules here
  Log level (lowest to highest):
     1. TRACE
     2. DEBUG
     3. INFO
     4. WARN
     5. ERROR
     6. FATAL
  -->
  <rules>
    <!-- Enable/Disable log level here
     To Disable a log level, set "enable" attribute to true
     To Enable a log level, set "enable" attribute to false -->
    <logger levels="Trace" name="*" writeTo="blackHole" final="true" enabled="false" />
    <logger levels="Info" name="*" writeTo="blackHole" final="true" enabled="false" />
    <logger levels="Debug" name="*" writeTo="blackHole" final="true" enabled="false" />
    <!-- ======================================= -->
    
    <logger name="*" minlevel="Trace" writeTo="RunFile,console,LogDashboard" />
  </rules>
</nlog>