PHP 错误日志记录不全面?
我正在使用 PHP,并且已打开错误日志记录并显示:
error_reporting = E_ALL | E_STRICT 日志错误 = 开 error_log = /路径/到/文件 显示错误=关闭
现在,这个日志文件捕获了大多数 PHP 错误,但有时我会进行更改,导致页面无法显示,并且没有记录到文件。
一个具体的例子是,如果我这样做:
interface InterfaceClass
{
public function someFunction();
}
class InterfaceInheriter implements InterfaceClass
{
final public function someFunction()
{
}
}
class FirstDerived extends InterfaceInheriter
{
public function someFunction()
{
}
}
现在一切都很好,我确信我犯了一些错误,但是我在哪里可以得到口译员的反馈?
回答: 由于我使用的是 Wordpress,结果发现它以某种方式过滤掉了一些日志消息。我最终通过为 Wordpress 设置适当的日志配置来修复它。
感谢您的帮助!
I'm working with PHP and have got the error logging turned on and turned up with:
error_reporting = E_ALL | E_STRICT log_errors = On error_log = /path/to/file display_errors = Off
Now this log files catches most PHP errors but occasionally I will make a change and have the page fail to display with no logging to the file.
A specific example of this is if I do:
interface InterfaceClass
{
public function someFunction();
}
class InterfaceInheriter implements InterfaceClass
{
final public function someFunction()
{
}
}
class FirstDerived extends InterfaceInheriter
{
public function someFunction()
{
}
}
Now this is all well and good, and i'm sure I have made some error, but where can I get the feedback from the interpreter for this?
ANSWER:
Since i'm using Wordpress it turns out that it was somehow filtering out some log messages. I fixed it in the end by setting the appropriate logging configuration for Wordpress.
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试放置 error_reporting(E_ALL | E_STRICT);在文件中..
try placing error_reporting(E_ALL | E_STRICT); in the file..