将警告记录到表中 [英] Log warnings into a table
问题描述
我在mysql forge网站上找到了以下代码.
I found the following code on mysql forge site.
MySQL代理:一种将所有警告和错误记录到MySQL表中的简便方法.
MySQL Proxy : An easy way to log all warnings and errors into a MySQL table.
http://forge.mysql.com/tools/tool.php ?id = 133
这听起来可能太基础了,但是如果需要此功能,我将从何处开始.
This may sound too basic, but from where do I start if I need this functionality.
推荐答案
Here you have more details about MySQL proxy scripting.
链接的脚本需要做什么?只需在MySQL数据库上运行它,它将为您做所有的魔术.这是一个完整的服务器端解决方案,因此您不必担心客户端应用程序中的日志记录错误. MySQL将为返回的每一行自动运行read_query
函数,为返回的每一组自动运行read_query_result
.
What you need to do with the script you linked is just run it on MySQL database and it will do all the magic for you. It's a complete server side solution so you don't have to worry about logging errors in your client application. MySQL will automatically run read_query
function for every row returned and read_query_result
for every set returned.
这篇关于将警告记录到表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!