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.
任何人都可以使用企业库异常处理应用程序块(EHAB)提供(或指向)用于记录异常的示例sql代码吗?即我希望结构和过程的标准CREATE TABLE和CREATE PROCEDURE语句将记录的异常存储在SQL Server数据库中。
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?
此外,任何人都可以描述应用程序块如何调用过程[WriteLogStoredProcedureName]和[AddCategoryStoredProcedureName](例如,它们应具有哪些参数以及它们如何设置)或者文档的位置是什么?
(NB: I'm using Enterprise Library 3.1 - May 2007 as I'm using .net 2.0)
(注意:我正在使用Enterprise Library 3.1 - 2007年5月,因为我正在使用.net 2.0)
1 个解决方案
#1
1
Default value of [WriteLogStoredProcedureName] is "WriteLog". Default value of [addCategoryStoredProcName] is "AddCategory".
[WriteLogStoredProcedureName]的默认值是“WriteLog”。 [addCategoryStoredProcName]的默认值是“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.
安装企业库,您将获得脚本“C:\ EntLib3Src \ App Blocks \ Src \ Logging \ TraceListeners \ Database \ Scripts \ LoggingDatabase.sql”。执行此脚本后,您将获得“Logging”数据库,其中包含所有必需的存储过程和表。
#1
1
Default value of [WriteLogStoredProcedureName] is "WriteLog". Default value of [addCategoryStoredProcName] is "AddCategory".
[WriteLogStoredProcedureName]的默认值是“WriteLog”。 [addCategoryStoredProcName]的默认值是“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.
安装企业库,您将获得脚本“C:\ EntLib3Src \ App Blocks \ Src \ Logging \ TraceListeners \ Database \ Scripts \ LoggingDatabase.sql”。执行此脚本后,您将获得“Logging”数据库,其中包含所有必需的存储过程和表。