数据库日志与企业库5 [英] Database Logging with Enterprise Library 5

查看:222
本文介绍了数据库日志与企业库5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道如何使用EL 5.0实现数据库异常记录?

Anybody knows how to implement database exception logging using EL 5.0?

谢谢!

推荐答案

您将需要对数据库运行的脚本,以便它为您创建一个特定的表结构。此外,将有将被创建,你将不得不在跟踪监听器的配置部分中引用的存储过程。你应该能够在这里找到这个脚本文件:C:\EntLib41Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts文件夹中。我知道这是为图书馆的4版本,但寻找到第5版,我意识到该文件夹​​结构已发生变化和脚本文件夹是看不到的地方。然而,这个网站这里应该为您提供一些指导。

You will need to run a script against the database so that it creates a specific table structure for you. Also, there will be a stored procedure that will be created that you will have to reference in the Trace Listener's configuration section. You should be able to find this script file here: C:\EntLib41Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts folder. I know this is for version 4 of the library, but looking into the version 5, I realized that the folder structure has taken a change and the script folder is no where in sight. However, this site here should provide you with some guidance.

您也可以尝试的 MSDN文档

所以,我做多一点点调查的EntLib50Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts文件夹中神秘失踪。它所练得是,如果你有使用MSI像我一样安装Entlib5到您的计算机。实际上有一个源代码MSI,您可以运行,在C深埋:\Program文件(x86)\Microsoft企业库5.0\src如果您使用的是64位PC或C:\Program Files\\ \\Microsoft企业库5.0\src,如果你不是。运行这个MSI,它会安装为Entlib5源代码,也缺少脚本文件夹中。

So I did a little bit more investigation into the mysterious disappearance of the EntLib50Src\Blocks\Logging\Src\DatabaseTraceListener\Scripts folder. What it turn out to be is that if you had install the Entlib5 to your computer using the MSI like I did. There is actually a Source Code MSI that you can run, buried deep in the C:\Program Files (x86)\Microsoft Enterprise Library 5.0\src if you're using a 64bit pc or C:\Program Files\Microsoft Enterprise Library 5.0\src if you're not. Run this MSI and it will install the the source codes for Entlib5 and also the missing Scripts folder.

这篇关于数据库日志与企业库5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆