Sha256: b608404612e692cf316ba0aba1a1a442bce6c3c1268eaa6d374ef9eab1db13d4

Contents?: true

Size: 757 Bytes

Versions: 3

Compression:

Stored size: 757 Bytes

Contents

using System;
using System.Web;

using NLog;
using NLog.Targets;

namespace SomeWebApplication
{
    public class Global : System.Web.HttpApplication
    {
        //
        // this event handler is executed at the very start of the web application
        // so this is a good place to configure targets programmatically
        // 
        // alternative you could place this code in a static type constructor
        //
        protected void Application_Start(Object sender, EventArgs e)
        {
            ASPNetTraceTarget target = new ASPNetTraceTarget();
            target.Layout = "${logger} ${message}";

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nlog-1.0.0.505.20100822 docs/examples/targets/Configuration API/ASPNetTrace/Global.asax.cs
nlog-1.0.0.505 docs/examples/targets/Configuration API/ASPNetTrace/Global.asax.cs
nlog-1.0.0.505-mswin32 docs/examples/targets/Configuration API/ASPNetTrace/Global.asax.cs