Logging exception in db

Topics: Data Access Application Block, Exception Handling Application Block, Logging Application Block
Apr 4, 2007 at 8:57 PM
Edited Apr 4, 2007 at 8:58 PM
If I'd like to handle an exception with Exception Handling Application Block and log it into the SQL database, does it mean that I must use Logging & Data Access Application Blocks?
Apr 4, 2007 at 9:04 PM
From what I saw in few other posts this may very well be the case.. But don't quote me on this - I'm just trying to scary you with 'unconfirmed' information ;)
Apr 4, 2007 at 11:40 PM
Correct, the built-in approach to doing this is
Exception Handling App Block -> Logging Application Block -> Data Access Application Block
In EntLib 3.0 you could also add the Policy Injection Application Block at the start if you're keen :-)

If you want to avoid so many moving parts, you could build your own simpler exception handler that writes to the database directly.