Aggiunta classe log NUOVE (come Logging...)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
|
||||
namespace MConnectSDK
|
||||
{
|
||||
internal static class Log
|
||||
{
|
||||
public static Logger Instance { get; private set; }
|
||||
static Log()
|
||||
{
|
||||
#if DEBUG
|
||||
// Setup the logging view for Sentinel - http://sentinel.codeplex.com
|
||||
var sentinalTarget = new NLogViewerTarget()
|
||||
{
|
||||
Name = "sentinal",
|
||||
Address = "udp://127.0.0.1:9999",
|
||||
IncludeNLogData = false
|
||||
};
|
||||
var sentinalRule = new LoggingRule("*", LogLevel.Trace, sentinalTarget);
|
||||
LogManager.Configuration.AddTarget("sentinal", sentinalTarget);
|
||||
LogManager.Configuration.LoggingRules.Add(sentinalRule);
|
||||
|
||||
#endif
|
||||
|
||||
LogManager.ReconfigExistingLoggers();
|
||||
|
||||
Instance = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,9 @@
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\MoonPro_dotnet\packages\NLog.4.6.2\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Pipelines.Sockets.Unofficial.1.0.9\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -90,6 +93,7 @@
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\GMW\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
@@ -115,12 +119,15 @@
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\GMW\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Threading.Channels, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\GMW\packages\System.Threading.Channels.4.5.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<package id="AIM" version="1.0.3" targetFramework="net462" />
|
||||
<package id="AjaxControlToolkit" version="18.1.1" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net462" />
|
||||
<package id="NLog" version="4.6.2" targetFramework="net462" />
|
||||
<package id="Pipelines.Sockets.Unofficial" version="1.0.9" targetFramework="net462" />
|
||||
<package id="SharpZipLib" version="1.1.0" targetFramework="net462" />
|
||||
<package id="StackExchange.Redis" version="2.0.519" targetFramework="net462" />
|
||||
|
||||
Reference in New Issue
Block a user