<?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"
      xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
      autoReload="true" >
  <!--
    Write events to a file with the date in the filename. 
    <target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
            layout="${longdate} ${uppercase:${level}} ${message}" />
    -->
  <targets async="true">
    <!-- when http://nlog.codeplex.com/workitem/6491 is fixed, then xsi:type="haf:RabbitMQ" instead -->
    <target name="errorfile" xsi:type="File"
         layout="${longdate} ${logger} ${message}"
         fileName="${basedir}/logs/errorlogfile.txt"
         archiveFileName="${basedir}/archives/errorlog.{#}.txt"
         archiveEvery="Day"
         archiveNumbering="Date"
         archiveDateFormat="yyyyMMdd"
         maxArchiveFiles="7"
         concurrentWrites="true"
         keepFileOpen="false"/>
    <target name="successfile" xsi:type="File"
        layout="${longdate} ${logger} ${message}"
        fileName="${basedir}/logs/successfile.txt"
        archiveFileName="${basedir}/archives/successlog.{#}.txt"
        archiveEvery="Day"
        archiveNumbering="Date"
       archiveDateFormat="yyyyMMdd"
         maxArchiveFiles="7"
         concurrentWrites="true"
        keepFileOpen="false"/>
  </targets>

  <rules>
    <!-- add your logging rules here -->

    <logger name="*" minlevel="Debug" maxlevel="Info" writeTo="successfile"/>
    <logger name="*" minlevel="Error" maxlevel="Fatal" writeTo="errorfile"/>
    <!--
    Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace)  to "f"
    <logger name="*" minlevel="Debug" writeTo="f" />
    -->
  </rules>
</nlog>