Logging block eats exceptions

Topics: Logging Application Block
Mar 21, 2008 at 2:59 PM
Currently the Logging block (as I have it set up) eats all exceptions that happen while logging. In my case, I hadn't grant execute permissions to the stored procs that the Logging block uses to all of my users, so information from some users wasn't getting logged. I would've rather found that out up front. Is there some way to configure the Logging block to not eat these exceptions?

Jon
Apr 8, 2008 at 5:37 PM
Jon, You can configure the LAB not to eat logging exceptions. It's your decision where you want the exceptions to go. I currently log exceptions that are generated by the LAB to a file. All you have to do is set up the Logging Errors listener like so,

<specialSources>
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="Rolling Flat File Trace Listener(LoggingErrorsWarnings)" />
</listeners>
</errors>
</specialSources>

The Logging Errors category is build in, you just have to turn it on. You'll have to create your own Trace Listener to send the data to.

-Travis