<?xml version="1.0" encoding="utf-8" ?>
<!-- 
  This file needs to be put in the application directory. Make sure to set 
  'Copy to Output Directory' option in Visual Studio.
  -->
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <targets>
        <target name="DebugView" xsi:type="OutputDebugString"
                layout="[JS] TID=${threadid:padding=4} ${threadname:padding=-4} ${level:padding=5} - ${message} ${exception:format=tostring} [${callsite}]${newline}"/>
        <!-- target name="file" xsi:type="File" fileName="${basedir}/log.txt" /-->
        <!-- target name="DebugView" xsi:type="OutputDebugString"
                layout="[JOBSERVER] ${level} - ${message} ${exception:format=tostring} [${callsite}]${newline}"/-->
        <!-- target name="EventLog" xsi:type="EventLog"
                layout="${message}" source="JobServer"/ -->
        <!-- target name="DebugPrint" xsi:type="MethodCall" className="JF.PlmJobManager.JobServer.LoggingTools,JobServer.exe" methodName="LogDebugPrint"/ -->
        <target name="LogTarget" xsi:type="Chainsaw" address="udp://localhost:7071"/>

        <!-- *1 log to LogFile JobClient_$log.txt
             23.04.2021/J.Fes add example to file
          -->
        <!-- target name="LogFile"
              xsi:type="File"
              fileName="${tempdir}/JobClient_$log.txt"
              layout="${longdate} ${level} - ${message} [${callsite}] ${exception:format=tostring}" /-->
    </targets>

    <rules>
      <!-- minlevel bezeichnet ab welchem Level Ausgaben erstellt werden = DebugMsg Filter  -->
      <!-- writeTo LogZiele  -->
      <!-- sagt das ab Debug eine Augabe in den Debug Viewer geschrieben wird -->        
      <logger name="*" minlevel="Off" writeTo="LogTarget" />
        
      <!-- sagt das ab Error ein Eintrag in den EventLog des ausführenden Rechners geschrieben wird -->
      <!--logger name="*" minlevel="Error" writeTo="EventLog" /-->
      <!--logger name="*" level="Debug" writeTo="DebugPrint" /-->
    </rules>

</nlog>
