From e3dd6b58eae1748a6973adb9becb8fc2d92adde9 Mon Sep 17 00:00:00 2001 From: Michael Krisper <michael.krisper@tugraz.at> Date: Mon, 9 May 2016 16:54:08 +0200 Subject: [PATCH] updated async-log flag in app.config, TRACE & DEBUG constants --- VECTO/VECTO.vbproj | 6 +++--- VECTO/app.config | 23 +++++++++++++---------- VectoConsole/App.config | 14 +++++++------- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/VECTO/VECTO.vbproj b/VECTO/VECTO.vbproj index 765eb45c20..0882913402 100644 --- a/VECTO/VECTO.vbproj +++ b/VECTO/VECTO.vbproj @@ -44,7 +44,7 @@ <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> - <DefineTrace>true</DefineTrace> + <DefineTrace>false</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <DocumentationFile>VECTO.xml</DocumentationFile> <NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn> @@ -56,8 +56,8 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>None</DebugType> <DefineDebug>false</DefineDebug> - <DefineTrace>true</DefineTrace> - <Optimize>false</Optimize> + <DefineTrace>false</DefineTrace> + <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DocumentationFile>VECTO.xml</DocumentationFile> <NoWarn>41999,42016,42017,42018,42019,42032,42036</NoWarn> diff --git a/VECTO/app.config b/VECTO/app.config index 96e61fb67a..b769e35b03 100644 --- a/VECTO/app.config +++ b/VECTO/app.config @@ -5,16 +5,19 @@ <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="true" - throwExceptions="false" - internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log"> - <targets> + 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 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} ${level:uppercase=true}: ${message} ${exception:format=tostring}" /> + layout="${longdate} [${processid}:${threadid}@${machinename}] ${callsite} ${level:uppercase=true}: ${message} ${exception:format=tostring}" /> </targets> <rules> <logger name="*" minlevel="Warn" writeTo="LogFile" /> @@ -37,8 +40,8 @@ </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" /> + 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> diff --git a/VectoConsole/App.config b/VectoConsole/App.config index 01a0f2b207..81aa14050a 100644 --- a/VectoConsole/App.config +++ b/VectoConsole/App.config @@ -8,15 +8,15 @@ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <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="true" - throwExceptions="false" - internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log"> - <targets> + 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 xsi:type="File" name="LogFile" fileName="${basedir}/logs/log_${threadid}.txt" - layout="${longdate} [${processid}:${threadid}@${machinename}] ${callsite} ${level:uppercase=true}: ${message} ${exception:format=tostring}" /> + layout="${longdate} [${processid}:${threadid}@${machinename}] ${callsite} ${level:uppercase=true}: ${message} ${exception:format=tostring}" /> </targets> <rules> <logger name="*" minlevel="Warn" writeTo="LogFile" /> -- GitLab