custom target, asp.net web app

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

custom target, asp.net web app

z4711
writing a custom target needs registering like

        protected void Application_Start(object sender, EventArgs e)
        {
            ConfigurationItemFactory.Default.Targets.RegisterDefinition("Interceptor", typeof(SimpleChat.InterceptTarget));
            NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
            logger.Info("application_start event fired");
        }

i made this in global.asax, but now i'am wondering that the first log message never arrives in the custom target, subsequent messages seems to be ok.

what i can do, to get all log messages?
Reply | Threaded
Open this post in threaded view
|

Re: custom target, asp.net web app

z4711
false alarm, anything seems to be ok

another time i struggled with the late attach of the VS debugger
global.asax is hard to debug, it's a known problem in VS