﻿<?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"
>
	<targets>
		<target
			name="ark.check-debugger"
			xsi:type="OutputDebugString"
			layout="Nexus ${level:padding=-6:upperCase=true} ${date:format=G} ${processname:padding=-15} [${threadid:padding=5}] - &quot;${threadname:padding=-30}&quot; ${logger:padding=-20} ${message} ${stacktrace:format=Flat:topFrames=7}"/>
		
		<target
			name="debugger"
			xsi:type="OutputDebugString"
			layout="Nexus ${level:padding=-6:upperCase=true} ${processname:padding=-15} [${threadid:padding=5}] - &quot;${threadname:padding=-30}&quot; ${logger:padding=-20} ${message} ${exception:format=tostring}"/>

		<target
			name="file-high-severity"
			xsi:type="File"
			archiveEvery="Day"
			archiveFileName="${specialfolder:folder=ApplicationData}/NVIDIA Corporation/Nsight/logs/Nsight.archive.{#####}.log"
			archiveNumbering="Sequence"
			fileName="${specialfolder:folder=ApplicationData}/NVIDIA Corporation/Nsight/logs/Nsight.log"
			maxArchiveFiles="10">

			<layout xsi:type="CSVLayout" delimiter="Comma" withHeader="false">
				<column name="level" layout="${level}"/>
				<column name="time" layout="${date:format=G}"/>
				<column name="process" layout="${processname}.exe"/>
				<column name="thread" layout="&apos;${threadname}&apos; id: ${threadid}"/>
				<column name="logger" layout="${logger}"/>
				<column name="message" layout="${message}"/>
				<column name="exception" layout="${exception:format=tostring}"/>
				<column name="stacktrace" layout="${stacktrace:format=Flat:topFrames=7}"/>
			</layout>
		</target>
	</targets>

	<rules>
		<!-- Disable debug configuration -->
		<!--
		<logger
			name="Ark.Check"
			minlevel="Trace"
			writeTo="ark.check-debugger,file-high-severity"
			final="true"/>
		
		<logger
			name="*"
			minlevel="Trace"
			writeTo="debugger"/>
		-->
		
		<logger
			name="*"
			minlevel="Error"
			writeTo="file-high-severity"/>
	</rules>
</nlog>
