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

  <variable name="logDir" value=""/>
  
  <targets>
    <target name="debug"
            xsi:type="Debugger"
            layout="${time} DEBUG: ${message}"
            />
    <target name="error"
            xsi:type="Debugger"
            layout="${time} ERROR: ${message}"
            />
    <target name="debugFile" xsi:type="File"
            fileName="${logDir}/ServerManager_Debug.log"
            layout="${time} [${level:uppercase=true}] ${message}"
            archiveFileName="${logDir}/ServerManager_Debug.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveEvery="Day"
            archiveDateFormat="yyyyMMdd"
            maxArchiveFiles="30"
            maxArchiveDays="30"
            />
    <target name="errorFile" xsi:type="File"
            fileName="${logDir}/ServerManager_Error.log"
            layout="${time} [${level:uppercase=true}] ${message}"
            archiveFileName="${logDir}/ServerManager_Error.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveEvery="Day"
            archiveDateFormat="yyyyMMdd"
            maxArchiveFiles="30"
            maxArchiveDays="30"
            />
    <target name="scripts" xsi:type="File"
            fileName="${logDir}/ServerManager_Scripts.log"
            layout="${time} [${level:uppercase=true}] ${message}"
            archiveFileName="${logDir}/ServerManager_Scripts.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveEvery="Day"
            archiveDateFormat="yyyyMMdd"
            maxArchiveFiles="30"
            maxArchiveDays="30"
            />
    <target name="statuswatcher" xsi:type="File"
            fileName="${logDir}/ServerManager_ServerStatus.log"
            layout="${time} [${level:uppercase=true}] ${message}"
            archiveFileName="${logDir}/ServerManager_ServerStatus.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveEvery="Day"
            archiveDateFormat="yyyyMMdd"
            maxArchiveFiles="30"
            maxArchiveDays="30"
            />
    <target name="taskscheduler" xsi:type="File"
            fileName="${logDir}/ServerManager_TaskScheduler.log"
            layout="${time} [${level:uppercase=true}] ${message}"
            archiveFileName="${logDir}/ServerManager_TaskScheduler.{#}.log"
            archiveNumbering="DateAndSequence"
            archiveEvery="Day"
            archiveDateFormat="yyyyMMdd"
            maxArchiveFiles="30"
            maxArchiveDays="30"
            />
  </targets>
  
  <rules>
    <logger enabled="false" name="*" maxlevel="debug" writeTo="debug"/>
    <logger enabled="false" name="*" minlevel="error" writeTo="error"/>

    <logger enabled="false" name="*" maxlevel="debug" writeTo="debugFile"/>
    <logger enabled="true"  name="*" minlevel="error" writeTo="errorFile"/>

    <logger enabled="true"  name="ServerManagerTool.Common.Utils.ScriptUtils"        minlevel="info" writeTo="scripts"/>
    <logger enabled="true"  name="ServerManagerTool.Common.Utils.TaskSchedulerUtils" minlevel="info" writeTo="taskscheduler"/>
    <logger enabled="true"  name="ServerManagerTool.Lib.ServerStatusWatcher"         minlevel="info" writeTo="statuswatcher"/>
  </rules>
  
</nlog>