EntLib Event Logging in 3.1 vs 4.0

Topics: Logging Application Block
Jul 22, 2008 at 10:14 PM
Hi,

I'm not sure if this is a configuration issue or not, but I've been using EntLib 4 and when I try to log an Event using a source that has not been registered, I get nothing written to the event log.

Its been a while since I used the 3.x versions, but when I was, I recall that if the source had not been registered, there would be some events written to the log saying that there was a problem with the event source.

Is this a change? Can I configure  something to get this behavior back?

-Andrew
Jul 22, 2008 at 11:23 PM
  <loggingConfiguration name="Logging Application Block"
                        tracingEnabled="true"
                        defaultCategory="General"
                        logWarningsWhenNoCategoriesMatch="true">
 
Think that is what you are looing for.

AndrewSeven wrote:
Hi,

I'm not sure if this is a configuration issue or not, but I've been using EntLib 4 and when I try to log an Event using a source that has not been registered, I get nothing written to the event log.

Its been a while since I used the 3.x versions, but when I was, I recall that if the source had not been registered, there would be some events written to the log saying that there was a problem with the event source.

Is this a change? Can I configure  something to get this behavior back?

-Andrew


Jul 23, 2008 at 2:20 PM
Thanks for the reply,

I have set logWarningsWhenNoCategoriesMatch set to true. The problem I have is with a Formatted EventLog TraceListener Source that isn't registered.

When I change my source from "MyRegisteredSource" to "UhOh", I no longer get any events. When I do this, I'm expecting to see event log entries from "Enterprise Library Logging" saying that there was a problem with the event source.

-Andrew