logging, map path fix
This commit is contained in:
parent
b1513d8e5d
commit
fbe0ef730d
|
|
@ -1,5 +1,8 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
using NLog;
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -14,6 +17,18 @@ namespace Novetus.ClientScriptTester
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new NLog.Config.LoggingConfiguration();
|
||||||
|
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = Assembly.GetExecutingAssembly().Location + "\\Tester-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log" };
|
||||||
|
config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
|
||||||
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
|
//https://stackify.com/csharp-catch-all-exceptions/
|
||||||
|
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
|
||||||
|
{
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
log.Error(eventArgs.Exception);
|
||||||
|
};
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,16 @@
|
||||||
<ApplicationIcon>NovetusIcon.ico</ApplicationIcon>
|
<ApplicationIcon>NovetusIcon.ico</ApplicationIcon>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Net" />
|
<Reference Include="System.Net" />
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
@ -69,6 +76,7 @@
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
||||||
|
</packages>
|
||||||
|
|
@ -91,7 +91,11 @@
|
||||||
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
@ -109,10 +113,13 @@
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ using Mono.Nat;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
using NLog;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace NovetusCMD
|
namespace NovetusCMD
|
||||||
|
|
@ -155,6 +156,18 @@ namespace NovetusCMD
|
||||||
#region Main Program Function
|
#region Main Program Function
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new NLog.Config.LoggingConfiguration();
|
||||||
|
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = GlobalPaths.ConfigDir + "\\CMD-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log" };
|
||||||
|
config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
|
||||||
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
|
//https://stackify.com/csharp-catch-all-exceptions/
|
||||||
|
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
|
||||||
|
{
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
log.Error(eventArgs.Exception);
|
||||||
|
};
|
||||||
|
|
||||||
if (args.Length > 0)
|
if (args.Length > 0)
|
||||||
{
|
{
|
||||||
CommandLineArguments.Arguments CommandLine = new CommandLineArguments.Arguments(args);
|
CommandLineArguments.Arguments CommandLine = new CommandLineArguments.Arguments(args);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||||
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
||||||
|
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
||||||
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
|
using NLog;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
@ -1177,26 +1178,34 @@ public class GlobalFuncs
|
||||||
|
|
||||||
box.AppendText("[" + DateTime.Now.ToShortTimeString() + "] - ", Color.White);
|
box.AppendText("[" + DateTime.Now.ToShortTimeString() + "] - ", Color.White);
|
||||||
|
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
box.AppendText(text, Color.Red);
|
box.AppendText(text, Color.Red);
|
||||||
|
log.Error(text);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
box.AppendText(text, Color.Lime);
|
box.AppendText(text, Color.Lime);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
box.AppendText(text, Color.Aqua);
|
box.AppendText(text, Color.Aqua);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
box.AppendText(text, Color.Yellow);
|
box.AppendText(text, Color.Yellow);
|
||||||
|
log.Warn(text);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
box.AppendText(text, Color.LightSalmon);
|
box.AppendText(text, Color.LightSalmon);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
box.AppendText(text, Color.White);
|
box.AppendText(text, Color.White);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1210,23 +1219,30 @@ public class GlobalFuncs
|
||||||
ConsoleText("[" + DateTime.Now.ToShortTimeString() + "] - ", ConsoleColor.White);
|
ConsoleText("[" + DateTime.Now.ToShortTimeString() + "] - ", ConsoleColor.White);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
ConsoleText(text, ConsoleColor.Red);
|
ConsoleText(text, ConsoleColor.Red);
|
||||||
|
log.Error(text);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ConsoleText(text, ConsoleColor.Green);
|
ConsoleText(text, ConsoleColor.Green);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ConsoleText(text, ConsoleColor.Cyan);
|
ConsoleText(text, ConsoleColor.Cyan);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ConsoleText(text, ConsoleColor.Yellow);
|
ConsoleText(text, ConsoleColor.Yellow);
|
||||||
|
log.Warn(text);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
default:
|
default:
|
||||||
ConsoleText(text, ConsoleColor.White);
|
ConsoleText(text, ConsoleColor.White);
|
||||||
|
log.Info(text);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@
|
||||||
<Reference Include="DotNetZip, Version=1.11.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
<Reference Include="DotNetZip, Version=1.11.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DotNetZip.1.11.0\lib\net20\DotNetZip.dll</HintPath>
|
<HintPath>..\packages\DotNetZip.1.11.0\lib\net20\DotNetZip.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
|
@ -94,7 +95,11 @@
|
||||||
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
@ -112,10 +117,13 @@
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
using NLog;
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -14,6 +16,18 @@ namespace NovetusLauncher
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new NLog.Config.LoggingConfiguration();
|
||||||
|
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = GlobalPaths.ConfigDir + "\\Launcher-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log" };
|
||||||
|
config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
|
||||||
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
|
//https://stackify.com/csharp-catch-all-exceptions/
|
||||||
|
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
|
||||||
|
{
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
log.Error(eventArgs.Exception);
|
||||||
|
};
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,6 @@
|
||||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||||
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
||||||
|
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
||||||
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -59,7 +59,11 @@
|
||||||
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
<Reference Include="Nini, Version=1.1.0.0, Culture=neutral, PublicKeyToken=691faec150a7fa7b, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
<HintPath>..\packages\Trove.Nini.1.1.0.0\lib\net20\Nini.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.IO, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.IO.dll</HintPath>
|
||||||
|
|
@ -70,10 +74,13 @@
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Bcl.1.1.8\lib\net40\System.Threading.Tasks.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#region Usings
|
#region Usings
|
||||||
|
using NLog;
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -14,6 +16,18 @@ namespace NovetusURI
|
||||||
[STAThread]
|
[STAThread]
|
||||||
private static void Main(string[] args)
|
private static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
var config = new NLog.Config.LoggingConfiguration();
|
||||||
|
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = GlobalPaths.ConfigDir + "\\URI-log-" + DateTime.Today.ToString("MM-dd-yyyy") + ".log" };
|
||||||
|
config.AddRule(LogLevel.Info, LogLevel.Fatal, logfile);
|
||||||
|
LogManager.Configuration = config;
|
||||||
|
|
||||||
|
//https://stackify.com/csharp-catch-all-exceptions/
|
||||||
|
AppDomain.CurrentDomain.FirstChanceException += (sender, eventArgs) =>
|
||||||
|
{
|
||||||
|
Logger log = LogManager.GetCurrentClassLogger();
|
||||||
|
log.Error(eventArgs.Exception);
|
||||||
|
};
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||||
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
||||||
|
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
||||||
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
<package id="Trove.Nini" version="1.1.0.0" targetFramework="net40" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -50,6 +50,7 @@ IF %M%==4 GOTO MENU
|
||||||
|
|
||||||
:CLEANJUNK
|
:CLEANJUNK
|
||||||
del /S Novetus\*.pdb
|
del /S Novetus\*.pdb
|
||||||
|
del /S Novetus\*.log
|
||||||
|
|
||||||
del /s /q Novetus\clients\2007M\content\scripts\CSMPBoot.lua
|
del /s /q Novetus\clients\2007M\content\scripts\CSMPBoot.lua
|
||||||
del /s /q Novetus\clients\2007M-Shaders\content\scripts\CSMPBoot.lua
|
del /s /q Novetus\clients\2007M-Shaders\content\scripts\CSMPBoot.lua
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue