配置 Elmah 使用现有的存储过程/表
我们的系统已经有一个表和一些用于日志记录的存储过程(Oracle)。我目前正在开发另一个系统,该系统将使用相同的数据库,但还没有用于记录错误的系统。
我读到 Elmah 是一个易于使用的系统,并尝试对其进行设置,但似乎默认情况下它会尝试使用可以制作 Elmah 下载附带的脚本的表格和过程。
所以,我的问题是,是否可以将 Elmah 配置为使用 myStoredProcedure,如果可以,我该如何配置?
We have a system that already has a table and some stored procedures used for logging (Oracle). I am currently working on another system which is going to use the same database, but does not have a system for logging errors yet.
I read that Elmah was an easy to use system, and have tried to set it up, but it seems that it by default tries to use tables and procedures that can be made the scripts that came with the Elmah download.
So, my question is, is it possible to configure Elmah to use myStoredProcedure, and if it is, how do I configure this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要更改 Elmah 调用的存储过程以及发送的参数,您必须 下载源代码,编辑OracleErrorLog.cs 文件,并重新编译。如果你对此感到舒服,那应该不会太难。
或者,您可以只编辑 Oracle.sql 脚本来更改内置 Elmah 包以指向您自己的表。
To change the stored procedure that Elmah calls, and the parameters that get sent, you would have to download the source code, edit the OracleErrorLog.cs file, and recompile. If you feel comfortable with that, it shouldn't be too hard.
Alternatively, you could just edit the Oracle.sql script to alter the built-in Elmah packages to point to your own tables.