Rory
Rory

Reputation: 41807

Example sql for logging exceptions to database using exception handling application block

Can anyone provide (or point me to) example sql code for logging exceptions using Enterprise Library Exception Handling Application Block (EHAB)? ie I'd like standard CREATE TABLE and CREATE PROCEDURE statements for the structures and procs to store logged exceptions in a SQL Server database.

Also, can anyone describe how the app block calls the procedures [WriteLogStoredProcedureName] and [AddCategoryStoredProcedureName] (e.g. what parameters should these have and how are they set) or where the documentation for this is?

(NB: I'm using Enterprise Library 3.1 - May 2007 as I'm using .net 2.0)

Upvotes: 0

Views: 5461

Answers (1)

Harshad
Harshad

Reputation: 26

Default value of [WriteLogStoredProcedureName] is "WriteLog". Default value of [addCategoryStoredProcName] is "AddCategory".

Install Enterprise Library and you will get script "C:\EntLib3Src\App Blocks\Src\Logging\TraceListeners\Database\Scripts\LoggingDatabase.sql". After executing this script, you will get "Logging" database ready with all required Stored procedures and tables.

Upvotes: 1

Related Questions