Sha256: 7344cd3a53e2e18a1c5db9a3f8e8fa8d26b33e6bcc1d3c2cacaa21ac84634b04

Contents?: true

Size: 519 Bytes

Versions: 3

Compression:

Stored size: 519 Bytes

Contents

using System;

using NLog;
using NLog.Targets;

class Example
{
    static void Main(string[] args)
    {
        MemoryTarget target = new MemoryTarget();
        target.Layout = "${message}";

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

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

        foreach (string s in target.Logs)
        {
            Console.Write("logged: {0}", s);
        }
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

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