Sha256: d36110761ccb9218d6c908e93ce6c3785481ec936f3b299e82a45ee4874c8482

Contents?: true

Size: 465 Bytes

Versions: 3

Compression:

Stored size: 465 Bytes

Contents

using NLog;

class MyClass {
    // storing logger reference in a static variable is clean and fast
    static Logger logger = LogManager.GetLogger("MyClass");

    static void Main()
    {
        logger.Debug("This is a debugging message");

        // it is not recommended to get the logger and store it in a local variable
        Logger logger2 = LogManager.GetLogger("MyClass");
        logger2.Debug("This is a debugging message");
    }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nlog-1.0.0.505.20100822 docs/examples/web/Performance.cs
nlog-1.0.0.505 docs/examples/web/Performance.cs
nlog-1.0.0.505-mswin32 docs/examples/web/Performance.cs