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

Skip to content
Snippets Groups Projects
Commit 744c348f authored by Michael KRISPER's avatar Michael KRISPER Committed by Markus QUARITSCH
Browse files

Pull request #243: Bugfix/VECTO-1621 logfile

Merge in VECTO/vecto-dev from VECTO/mk_vecto-dev:bugfix/VECTO-1621-logfile to develop

* commit '19133cf6':
  Change Deploy Target to include nlog.config file (and excluded the *.exe.config files)
  Corrected missing LOG in .NET 6.0. Now works for all framework versions.
parents 65c09dce 19133cf6
No related branches found
No related tags found
No related merge requests found
......@@ -20,13 +20,14 @@
<ItemGroup>
<!-- All files for net45 -->
<Net45VECTO Include="$(SolutionDir)VECTO\bin\Release\net45\*.exe*"/>
<Net45VECTO Include="$(SolutionDir)VECTO\bin\Release\net45\*.exe"/>
<Net45VECTO Include="$(SolutionDir)VECTO\bin\Release\net45\*.dll*"/>
<Net45HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net45\*.exe*"/>
<Net45Vecto Include="$(SolutionDir)VECTO\bin\Release\net45\nlog.config"/>
<Net45HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net45\*.exe"/>
<Net45HashingTool Include="$(SolutionDir)HashingTool\bin\Release\net45\*.dll*"/>
<Net45HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net45\*.exe*"/>
<Net45HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net45\*.exe"/>
<Net45HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net45\*.dll*"/>
<Net45VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net45\*.exe*"/>
<Net45VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net45\*.exe"/>
<Net45VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net45\*.dll*"/>
</ItemGroup>
<Copy SourceFiles="@(Net45VectoCommandLine)" DestinationFolder="$(DeployPath)net45"/>
......@@ -35,13 +36,14 @@
<ItemGroup>
<!-- All files for net48 -->
<Net48VECTO Include="$(SolutionDir)VECTO\bin\Release\net48\*.exe*"/>
<Net48VECTO Include="$(SolutionDir)VECTO\bin\Release\net48\*.exe"/>
<Net48VECTO Include="$(SolutionDir)VECTO\bin\Release\net48\*.dll*"/>
<Net48HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net48\*.exe*"/>
<Net48Vecto Include="$(SolutionDir)VECTO\bin\Release\net48\nlog.config"/>
<Net48HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net48\*.exe"/>
<Net48HashingTool Include="$(SolutionDir)HashingCmd\bin\Release\net48\*.dll*"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net48\*.exe*"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net48\*.exe"/>
<Net48VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net48\*.dll*"/>
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.exe*"/>
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.exe"/>
<Net48VectoMultistage Include="$(SolutionDir)VECTO3GUI2020\bin\Release\net48\*.dll*"/>
</ItemGroup>
<Copy SourceFiles="@(Net48VectoCommandLine)" DestinationFolder="$(DeployPath)net48"/>
......@@ -53,6 +55,7 @@
<!-- All files for net6.0 -->
<Vecto Include="$(SolutionDir)VECTO\bin\Release\net6.0-windows\VECTO.*" Exclude="*.dev.json"/>
<Vecto Include="$(SolutionDir)VECTO\bin\Release\net6.0-windows\*.dll"/>
<Vecto Include="$(SolutionDir)VECTO\bin\Release\net6.0-windows\nlog.config"/>
<VectoRuntimes Include="$(SolutionDir)VECTO\bin\Release\net6.0-windows\runtimes\**\*.*"/>
<VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net6.0\vectocmd.*" Exclude="*.dev.json"/>
<VectoCommandLine Include="$(SolutionDir)VectoConsole\bin\Release\net6.0\*.dll"/>
......
......@@ -14,6 +14,14 @@
<DefineTrace>false</DefineTrace>
<DefineConstants />
</PropertyGroup>
<ItemGroup>
<None Remove="nlog.config" />
</ItemGroup>
<ItemGroup>
<Content Include="nlog.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
......
<?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="GUILogger" xsi:type="MethodCall" className="TUGraz.VECTO.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" />
</targets>
<rules>
<logger name="TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory" minlevel="Info" writeTo="LogFile" />
<logger name="*" minlevel="Warn" writeTo="LogFile" />
<logger name="*" minlevel="Warn" writeTo="GUILogger" />
</rules>
</nlog>
<system.diagnostics>
<sources>
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog" />
</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" />
</sharedListeners>
</system.diagnostics>
</configuration>
\ No newline at end of file
<?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" 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="GUILogger" xsi:type="MethodCall" className="TUGraz.VECTO.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" />
</targets>
<rules>
<logger name="TUGraz.VectoCore.Models.Simulation.Impl.SimulatorFactory" minlevel="Info" writeTo="LogFile" />
<logger name="*" minlevel="Warn" writeTo="LogFile" />
<logger name="*" minlevel="Warn" writeTo="GUILogger" />
</rules>
</nlog>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment