Sha256: 32d0f3269d93233758f9b70d370c636db65af11dba1efbf1f2fe8dc9c317e86f

Contents?: true

Size: 681 Bytes

Versions: 3

Compression:

Stored size: 681 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";

        RetryingTargetWrapper target = new RetryingTargetWrapper();
        target.WrappedTarget = wrappedTarget;
        target.RetryCount = 3;
        target.RetryDelayMilliseconds = 1000;

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