Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
app.config 2.68 KiB
Newer Older
<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<configSections>
		<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
	</configSections>
	<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
				xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
				autoReload="false"
				throwExceptions="false"
				internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
		<targets async="true">
			<target xsi:type="Console" name="ConsoleLogger" error="true" />
			<target name="WarningLogger" xsi:type="MethodCall" className="VECTO.F_MAINForm, VECTO" methodName="LogMethod">
				<parameter layout="${level}" />
				<parameter layout="${message}" />
			</target>
			<target xsi:type="File"
							name="LogFile"
							fileName="${basedir}/logs/log.txt"
							layout="${longdate} [${processid}:${threadid}@${machinename}] ${callsite:skipFrames=1} ${level:uppercase=true}: ${message} ${exception:format=tostring}"
							keepFileOpen="false"
							archiveFileName="${basedir}/logs/archive{#}.txt"
							maxArchiveFiles="1"
							archiveAboveSize="10000000" />
			<logger name="TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory" minlevel="Info" writeTo="LogFile" />
			<logger name="*" minlevel="Warn" writeTo="LogFile" />
Markus Quaritsch's avatar
Markus Quaritsch committed
			<logger name="*" minlevel="Error" writeTo="WarningLogger" />
		</rules>
	</nlog>
	<system.diagnostics>
		<sources>
			<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
			<source name="DefaultSource" switchName="DefaultSwitch">
				<listeners>
					<add name="FileLog" />
					<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
					<!--<add name="EventLog"/>-->
				</listeners>
			</source>
		</sources>
		<switches>
			<add name="DefaultSwitch" value="Information" />
		</switches>
		<sharedListeners>
			<add name="FileLog"
					type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
					initializeData="FileLogWriter" />
			<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
			<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
		</sharedListeners>
	</system.diagnostics>
	<startup>
		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
	</startup>
</configuration>