Pear Log MDB2 消息长度和错误
我最近用 PEAR 设置了一个 SQL 日志框架,一切都运行良好。
但是,我认为消息字段的默认长度 (VARCHAR 200
) 有点短,因此我更改了 phpmyadmin 中的数据库结构,将其增加到 512
。
然而,我很快意识到这一更改完全停止了日志记录的工作。我很快将长度改回200
。然而,即使经过此更改,日志记录仍然无法正常工作。我已将错误追溯到日志函数,但不幸的是它没有给我失败的具体原因。
所以,我的问题是双重的:
有人在使用 PEAR 日志记录时遇到过这个问题或类似的问题吗?
创建更长消息字段的正确方法是什么?
I recently set up a SQL logging framework with PEAR, and everything was working fine.
However, I thought that the default length of the message field (VARCHAR 200
) was a little short, so I changed my database structure in phpmyadmin to increase this to 512
.
However, I quickly realized that this change completely stopped logging from working. I quickly changed the length back to 200
. However, even after this change, logging is still broken. I have traced the error to the log function, but unfortunately it does not give me a specific reason why it fails.
So, my question is twofold:
Has anyone run into this problem or something similar when using PEAR logging?
What is the correct way to create a longer message field?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现删除旧数据库并创建一个新数据库(即使消息字段更长)效果很好。如果您想要保留大量持久日志数据,显然这不是一个好的解决方案。如果有人对可能发生的事情有任何见解,我很想听听。
I found that deleting the old database and creating a new one (even with a longer message field) worked fine. Obviously not a good solution if you have lots of persistent log data that you want to keep. If anyone has any insight as to what could have been going on I would love to hear it.