ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug

From: DevilDog74 (cedricb_at_youcanthaveit.com)
Date: 08/23/04


Date: Mon, 23 Aug 2004 14:09:17 -0400

I am using the Logging application block. I installed it fine and for the
most part, it pretty much works.

I am using the Logging block just so that I dont have to write my own SQL
Sink. Using the "BasicSqlSinkSample" that provided, I added the modified
the BasicSqlSinkSample.cs as follows:

AdminMessageEvent adminMessageEvent = new AdminMessageEvent();

adminMessageEvent.Message = "Admin Message Event to be published";

adminMessageEvent.EventPublishLogLevel = (int)LogLevel.Always;

EventSource.Application.Raise(adminMessageEvent);

// here is my new line:

ErrorMessageEvent.Raise("Test Exception",1,"5000");

The error message is never published to the Log table, but the other events
are. If I set the applicationLogLevel=debug, then the ErrorMessageEvent
will be logged.

I was under the impression that ALL ErrorMessageEvents would always be
logged? Is this correct? I have read the LoggineApplicationBlock manual
forward and backwards may many times. What could I be missing?

The text below shows my eventSources, filterBindings, and my filters.

<eventSources>

<eventSource name="RequestTracing.RequestTraceTest.GenerateTraceEvents"
type="request" internalExceptionHandler="report" />

<eventSource name="Application" type="softwareElement"
internalExceptionHandler="report" description="Application level event
source." />

</eventSources>

<filterBindings>

<eventSourceRef name="RequestTracing.RequestTraceTest.GenerateTraceEvents">

<filterRef name="defaultRequestFilter" />

</eventSourceRef>

<eventSourceRef name="Application">

<filterRef name="defaultSoftwareElementFilter" />

</eventSourceRef>

</filterBindings>

<filters>

<filter name="defaultSoftwareElementFilter" description="A default filter
for the Software Element event sources.">

<eventCategoryRef name="Standard Events">

<eventSinkRef name="basicLogSink"/>

</eventCategoryRef>

<eventCategoryRef name="Metering Events">

<eventSinkRef name="meteringLogSink"/>

</eventCategoryRef>

</filter>

<filter name="defaultRequestFilter" description="A default filter for the
Request event sources.">

<eventCategoryRef name="Known Event Types">

<eventSinkRef name="basicLogSink"/>

</eventCategoryRef>

</filter>

</filters>

Any help would be much appreciated.

Cheers.



Relevant Pages

  • Re: ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug
    ... I dont know the answer to the question below. ... produced the logging block said: ... |> AdminMessageEvent adminMessageEvent = new AdminMessageEvent; ... |> The text below shows my eventSources, filterBindings, and my filters. ...
    (microsoft.public.vsnet.enterprise.tools)
  • Re: Another mappath error
    ... Not sure why it would allow the logging with that in place. ... Generally, with logging, I use some form of logging block. ... streamwriter object is triggering the following exception but I dont ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug
    ... applicaiton block would care or have something to say about this. ... > I am using the Logging block just so that I dont have to write my own SQL ... then the ErrorMessageEvent ... > The text below shows my eventSources, filterBindings, and my filters. ...
    (microsoft.public.vsnet.enterprise.tools)

Loading