<?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="appType" value="" />
	<variable name="appId" value="" />
	<targets>
		<target name="all" xsi:type="File"
			fileName="${basedir}/../Logs/Log.txt"
			deleteOldFileOnStartup="false"
			layout="${longdate} ${var:appType} ${var:appId} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message}" />
	</targets>
	
	<targets>
		<target name="debug" xsi:type="File"
			fileName="${basedir}/../Logs/Log-${var:appType}-${var:appId}-Debug.txt"
			deleteOldFileOnStartup="false"
			layout="${longdate} ${var:appType} ${var:appId} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message}" />
	</targets>

	<targets>
		<target name="info" xsi:type="File"
			fileName="${basedir}/../Logs/Log-${var:appType}-${var:appId}-Info.txt"
			deleteOldFileOnStartup="false"
			layout="${longdate} ${var:appType} ${var:appId} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message}" />
	</targets>
	
	<targets>
		<target name="error" xsi:type="File"
			fileName="${basedir}/../Logs/Log-${var:appType}-${var:appId}-Error.txt"
			deleteOldFileOnStartup="false"
			layout="${longdate} ${var:appType} ${var:appId} ${callsite:className=false:methodName=false:fileName=true:includeSourcePath=false:skipFrames=2} ${message} ${stacktrace:format=Flat:topFrames=100:skipFrames=2}" />
	</targets>
	
	<rules>
		<logger name="*" minlevel="Trace" writeTo="all" />
		<logger name="*" minlevel="Debug" writeTo="debug" />
		<logger name="*" minlevel="Info" maxlevel="Info" writeTo="info" />
		<logger name="*" minlevel="Error" writeTo="error" />
	</rules>
</nlog>