Sha256: 3c2241b964635a4d460f6a92464c7dfe4b390bf8d9e0e9bb9134110e30f8a6dd

Contents?: true

Size: 586 Bytes

Versions: 3

Compression:

Stored size: 586 Bytes

Contents

using NLog;
using NLog.Targets;

class Example
{
    static void Main(string[] args)
    {
        FileTarget target = new FileTarget();
        target.Layout = "${longdate} ${logger} ${message}";
        target.FileName = "${basedir}/${shortdate}/${windows-identity:domain=false}.${level}.log";
        target.KeepFileOpen = false;
        target.Encoding = "iso-8859-2";

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