[ 
https://issues.apache.org/jira/browse/IGNITE-3279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15432611#comment-15432611
 ] 

Pavel Tupitsyn commented on IGNITE-3279:
----------------------------------------

How to test:
* Use `Ignite Platform .NET NuGet NEW` TeamCity suite on master branch to build 
all NuGet packages. There should be `Apache.Ignite.NLog.*.nupkg` package in the 
artifacts.
* Download all artifacts to an empty <Folder>.
* Create a new console project in Visual Studio.
* In Visual Studio Package Manager Console run `Install-Package 
Apache.Ignite.NLog -Pre -Source <Folder>`.
* Run the following code and observe colored console output (instead of the 
usual gray-only):
{code}
using System.Collections.Generic;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Log;
using Apache.Ignite.NLog;
using NLog;
using NLog.Config;
using NLog.Targets;
using LogLevel = NLog.LogLevel;

namespace ConsoleApplication14
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            var logCfg = new LoggingConfiguration();
            var target = new ColoredConsoleTarget();
            logCfg.AddTarget("con", target);
            logCfg.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, 
target));

            LogManager.Configuration = logCfg;

            var cfg = new IgniteConfiguration
            {
                Logger = new 
IgniteNLogLogger(LogManager.GetCurrentClassLogger()),
                JvmOptions = new List<string> {"-DIGNITE_QUIET=false"}
            };

            var ignite = Ignition.Start(cfg);

            ignite.Logger.Error("Test error!");
        }
    }
}
{code}

> .NET: NLog integration
> ----------------------
>
>                 Key: IGNITE-3279
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3279
>             Project: Ignite
>          Issue Type: New Feature
>          Components: platforms
>    Affects Versions: 1.7
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>              Labels: .net, roadmap
>             Fix For: 1.8
>
>
> Provide NLog implementation for {code}Apache.Ignite.Core.Log.ILogger{code}
> Should be in a separate assembly/nuget.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to