ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug
From: DevilDog74 (cedricb_at_youcanthaveit.com)
Date: 08/23/04
- Next message: Igor Green: "Re: WinDiff.exe command line"
- Previous message: BigMan: "WinDiff.exe command line"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Igor Green: "Re: WinDiff.exe command line"
- Previous message: BigMan: "WinDiff.exe command line"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|