简体   繁体   English

zend framework 2错误报告

[英]zend framework 2 error reporting

I'm having some problems getting zf2 to log errors or report them under some circumstances. 在某些情况下,让zf2记录错误或报告错误时遇到了一些问题。

Some errors will be reported to screen and the error.log but others are not and just result in a blank screen. 某些错误将报告给屏幕和error.log,但其他错误不会报告给屏幕。 There doesn't appear to be any reasoning behind what does get displayed and what doesn't. 显示什么和不显示什么似乎没有任何理由。

I have error reporting enabled in my php ini set to E_ALL and I have added 我在将php ini设置为E_ALL时启用了错误报告,并且我已经添加了

'display_not_found_reason' => true,
'display_exceptions'       => true,

to my module config, and I have also tried setting the error reporting values directly in the index.php 到我的模块配置,我也尝试过直接在index.php中设置错误报告值

At the moment im trying to use doctrine and just getting a blank screen... 目前,我正在尝试使用教义,只是出现了黑屏...

https://packagist.org/packages/webino/nette-debug https://packagist.org/packages/webino/nette-debug

Link listed above is one of the most useful debug tools I've found so far for zf2. 上面列出的链接是我迄今为止发现的针对zf2的最有用的调试工具之一。 It picks up 99.9% of the errors and the configuration allows you to log it to a specific log file in your directory. 它可以捕获99.9%的错误,并且通过配置可以将其记录到目录中的特定日志文件中。 However there is that .1% that it doesn't catch and that generally does go through to the syslog so you should be able to find out more details there. 但是,有.1%的代码无法捕获,并且通常会进入系统日志,因此您应该能够在此处找到更多详细信息。 Just make sure you initialize the nette debug module as the first module in the stack. 只需确保将nette调试模块初始化为堆栈中的第一个模块即可。

Hope this helps you, I got really sick and tired of those issues too up to the point where where I found nette. 希望这对您有帮助,我对这些问题感到非常厌烦,直到发现nette为止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM