<?xml version="1.0" encoding="utf-8" ?>
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema-->
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  autoReload="true" >

  <variable name="logDirectory" value="D:\Logs\BO" />
  <variable name="appName" value="BO.ProcessServer" />

  <!-- the targets to write to -->
  <targets>
    <target xsi:type="File" 
      name="OutToFile" 
      layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff}|${level:uppercase=true}|${threadid}|${message}|${logger}|${all-event-properties}" 
      fileName="${logDirectory}\${appName}.log"
      archiveFileName="${logDirectory}\${appName}.{#}.log"
      archiveEvery="Day"
      archiveAboveSize="104857600"
      archiveNumbering="DateAndSequence"
      archiveDateFormat="yyyy-MM-dd"
      maxArchiveFiles="30"
      concurrentWrites="false"
      keepFileOpen="true"
      encoding="utf-8"
      writeBom="true" />
    <target xsi:type="File" 
      name="OutToFileException" 
      layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff}|${level:uppercase=true}|${threadid}|${message} ${exception}|${logger}|${all-event-properties}"
      fileName="${logDirectory}\${appName}-Exceptions.log"
      archiveFileName="${logDirectory}\${appName}-Exceptions.{#}.log"
      archiveEvery="Day"
      archiveAboveSize="104857600"
      archiveNumbering="DateAndSequence"
      archiveDateFormat="yyyy-MM-dd"
      maxArchiveFiles="30"
      concurrentWrites="false"
      keepFileOpen="true"
      encoding="utf-8"
      writeBom="true" />
    <target xsi:type="File" 
            name="OutToFileLifecycle" 
            layout="${date:format=yyyy-MM-dd HH\:mm\:ss.fff}|${level:uppercase=true}|${threadid}|${message}|${logger}|${all-event-properties}" 
            fileName="${logDirectory}\${appName}-Lifecycle.log"
            archiveFileName="${logDirectory}\${appName}-Lifecycle.{#}.log"
            archiveEvery="Day"
            archiveAboveSize="104857600"
            archiveNumbering="DateAndSequence"
            archiveDateFormat="yyyy-MM-dd"
            maxArchiveFiles="30"
            concurrentWrites="false"
            keepFileOpen="true"
            encoding="utf-8"
            writeBom="true" />
    <target xsi:type="Console" 
            name="OutToConsole"
            layout="[${level:uppercase=true}/${threadid}] ${message}" />
  </targets>

  <!-- rules to map from logger name to target -->
  <rules>
    <logger name="*" writeTo="OutToConsole" />
    <logger name="*" writeTo="OutToFile" />
    <logger name="*" level="Error" writeTo="OutToFileException" />
    <logger name="Lifecycle" writeTo="OutToFileLifecycle" /> 
  </rules>
</nlog>