Sha256: f38ea1f3cd500e0d38f9b3b04446c309180c35d3be2996d7e12310de8c898054

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

using System;

using NLog;
using NLog.Targets;
using System.Diagnostics;

class Example
{
    static void Main(string[] args)
    {
        Trace.Listeners.Add(new ConsoleTraceListener());

        TraceTarget target = new TraceTarget();
        target.Layout = "${message}";

        NLog.Config.SimpleConfigurator.ConfigureForTargetLogging(target, LogLevel.Debug);

        Logger logger = LogManager.GetLogger("Example");
        logger.Debug("log message");
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nlog-1.0.0.505.20100822 docs/examples/targets/Configuration API/Trace/Simple/Example.cs
nlog-1.0.0.505 docs/examples/targets/Configuration API/Trace/Simple/Example.cs
nlog-1.0.0.505-mswin32 docs/examples/targets/Configuration API/Trace/Simple/Example.cs