<?xml version="1.0" encoding="utf-8" ?>
<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"
    internalLogFile="/data/serviceslogs/JT1078.Gateway.TestNormalHosting/internalLog.txt"
    internalLogLevel="Debug">
  <variable name="Directory" value="/data/serviceslogs/JT1078.Gateway.TestNormalHosting"/>
  <targets>
    <target name="all" xsi:type="File"
             fileName="${Directory}/all.${shortdate}.log"
             layout="${date:format=yyyyMMddHHmmss} ${callsite} ${level}:${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}"/>   
    <target name="JT1078FlvNormalMsgHostedService" xsi:type="File"
             fileName="${Directory}/JT1078FlvNormalMsgHostedService.${shortdate}.log"
             layout="${date:format=yyyyMMddHHmmss} ${callsite} ${level}:${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}"/>
    <target name="JT1078TcpServer" xsi:type="File"
             fileName="${Directory}/JT1078TcpServer.${shortdate}.log"
             layout="${date:format=yyyyMMddHHmmss} ${callsite} ${level}:${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}"/>
    <target name="JT1078UdpServer" xsi:type="File"
           fileName="${Directory}/JT1078UdpServer.${shortdate}.log"
           layout="${date:format=yyyyMMddHHmmss} ${callsite} ${level}:${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}"/>
    <target name="JT1078Logging" xsi:type="File"
             fileName="${Directory}/JT1078Logging.${shortdate}.log"
             layout="${message}"/>
    <target name="console" xsi:type="ColoredConsole"
           useDefaultRowHighlightingRules="false"
           layout="${date:format=yyyyMMddHHmmss} ${callsite} ${level} ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}">
      <highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
      <highlight-row condition="level == LogLevel.Info" foregroundColor="Gray" />
      <highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
      <highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
      <highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" backgroundColor="White" />
    </target>
  </targets>
  <rules>
    <logger name="*" minlevel="Error" writeTo="all"/>
    <logger name="JT1078.Gateway.TestNormalHosting.Services.JT1078FlvNormalMsgHostedService" minlevel="Trace" writeTo="JT1078FlvNormalMsgHostedService"/>
    <logger name="JT1078.Gateway.JT1078TcpServer" minlevel="Trace" writeTo="JT1078TcpServer"/>
    <logger name="JT1078.Gateway.JT1078UdpServer" minlevel="Trace" writeTo="JT1078UdpServer"/>
    <logger name="JT1078.Gateway.JT1078Logging" minlevel="Trace" writeTo="JT1078Logging"/>
  </rules>
</nlog>