<?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"
      throwExceptions="false"
      internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">

    <variable name="logDir" value="${basedir}/logs"/>
    <targets>
        <target xsi:type="File"
            name="f_base"
            fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
            layout="${longdate} [${uppercase:${level}}] | ${logger:shortName=true} | ${message}"
            archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
            archiveNumbering="Sequence"
            archiveAboveSize="10240000"
            maxArchiveFiles="90"
            enableArchiveFileCompression="false"
            keepFileOpen="false"
        />
        <target xsi:type="File"
            name="f_error"
            fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.log"
            layout="${longdate} [${uppercase:${level}}] | ${logger:shortName=true} | ${message}"
            archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}_err.{###}.log"
            archiveNumbering="Sequence"
            archiveAboveSize="10240000"
            maxArchiveFiles="90"
            enableArchiveFileCompression="false"
            keepFileOpen="false"
        />
    </targets>
    <rules>
        <!-- Logging Levels (Trace, Debug, Info, Warn, Error, Fatal)-->
        <logger name="*" minlevel="Debug" maxlevel="Warn" final="true" writeTo="f_base" />
        <logger name="*" minlevel="Error" writeTo="f_error" />
    </rules>
</nlog>
