Sha256: fe7e5ae2e205f7260c188ed37220c5b86ed6b229c0635e324cce7e9fd8268110

Contents?: true

Size: 637 Bytes

Versions: 3

Compression:

Stored size: 637 Bytes

Contents

using System;

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

class Example
{
    static void Main(string[] args)
    {
        FileTarget wrappedTarget = new FileTarget();
        wrappedTarget.FileName = "${basedir}/file.txt";

        RepeatingTargetWrapper target = new RepeatingTargetWrapper();
        target.WrappedTarget = wrappedTarget;
        target.RepeatCount = 3;

        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/RepeatingWrapper/Simple/Example.cs
nlog-1.0.0.505 docs/examples/targets/Configuration API/RepeatingWrapper/Simple/Example.cs
nlog-1.0.0.505-mswin32 docs/examples/targets/Configuration API/RepeatingWrapper/Simple/Example.cs