Logger.IsLoggingEnabled() throws exception if configuration section is not found

Topics: Logging Application Block
Mar 25, 2008 at 11:43 AM

I've run into the issue when LAB's Logger throws an exception from IsLoggingEnabled() in case of the configuration section is not found. My question is it's the correct behavior for such method which, in my opinion, should just say No (false) in such a case. Because if logging is not configured it means it's not enabled. Am I right? Currently to handle these exceptions I have to wrap all IsLoggingEnabled() calls in try-catch what is time expensive from the performance point of view.

Thanks, Leonid