portata classe logger dentro IO
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using NLog.Targets;
|
||||
|
||||
namespace SteamWare.IO
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe helper x LOG basata su NLog
|
||||
/// </summary>
|
||||
public static class Logging
|
||||
{
|
||||
/// <summary>
|
||||
/// S
|
||||
/// </summary>
|
||||
public static NLog.Logger Instance { get; private set; }
|
||||
static Logging()
|
||||
{
|
||||
#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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@
|
||||
<DependentUpon>DataLayer_generic.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="fileMover.cs" />
|
||||
<Compile Include="Logging.cs" />
|
||||
<Compile Include="NetworkConnection.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
@@ -70,12 +71,6 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\VisualStudioProject\SteamWare\SteamWare.Logger\SteamWare.Logger.csproj">
|
||||
<Project>{97a9f482-c173-4f0f-9f8f-7bb41c59cdd6}</Project>
|
||||
<Name>SteamWare.Logger</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="DataLayer_generic.xsc">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using SteamWare.Logger;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
@@ -62,9 +62,7 @@
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="resources\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="App_Readme\README_SteamWare.txt" />
|
||||
<Content Include="App_Readme\SteamWare_demo\example-favicon.ico" />
|
||||
|
||||
Reference in New Issue
Block a user