diff --git a/ATxDiagnostics/ATxDiagnostics.cs b/ATxDiagnostics/ATxDiagnostics.cs index d547c335eb9c2e5646a7cd226c3967434966848c..7f1c72586c8f0eea9cde9b9ce90ebb7474ecd06c 100644 --- a/ATxDiagnostics/ATxDiagnostics.cs +++ b/ATxDiagnostics/ATxDiagnostics.cs @@ -1,12 +1,26 @@ using System; using ATxCommon; +using NLog; +using NLog.Config; +using NLog.Targets; namespace ATxDiagnostics { class ATxDiagnostics { - static void Main(string[] args) - { + private static readonly Logger Log = LogManager.GetCurrentClassLogger(); + + static void Main(string[] args) { + var logConfig = new LoggingConfiguration(); + var logTargetConsole = new ConsoleTarget { + Name = "console", + Header = "test-header", + }; + logConfig.AddTarget(logTargetConsole); + var logRuleConsole = new LoggingRule("*", LogLevel.Trace, logTargetConsole); + logConfig.LoggingRules.Add(logRuleConsole); + LogManager.Configuration = logConfig; + Console.WriteLine(SystemChecks.WmiSummary()); } } diff --git a/ATxDiagnostics/ATxDiagnostics.csproj b/ATxDiagnostics/ATxDiagnostics.csproj index 645124b31aa0b4deda7ec811ecefbb7bb42c338c..d234b10637df3f7d86a27927ae4337bd1a6e9e94 100644 --- a/ATxDiagnostics/ATxDiagnostics.csproj +++ b/ATxDiagnostics/ATxDiagnostics.csproj @@ -33,6 +33,14 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <ItemGroup> + <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> + <HintPath>..\packages\NLog.4.3.11\lib\net45\NLog.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + </ItemGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" />