What is the best way to log errors in Zend Framework 1?

前端 未结 2 1342
走了就别回头了
走了就别回头了 2021-02-04 04:46

We built an app in Zend Framework (v1) and have not worked a lot in setting up error reporting and logging. Is there any way we could get some level or error reporting without t

2条回答
  •  孤城傲影
    2021-02-04 05:39

    You can use Zend_Controller_Plugin_ErrorHandler . As you can see on the documentation page there is an example that checks for missing controller/action and shows you how to set the appropriate headers.

    You can then use Zend_Log to log your error messages to disk/db/mail.

提交回复
热议问题