ZF2 Module. For handle and log errors
If enabled you can log all PHP errors\notices\warnings etc.
Add this project in your composer.json:
"require": {
"t4web/error-handler": "~1.0.0"
}
Now tell composer to download T4web\ErrorHandler
by running the command:
$ php composer.phar update
Enabling it in your application.config.php
file.
<?php
return array(
'modules' => array(
// ...
'T4web\Log',
'T4web\ErrorHandler',
),
// ...
);
For example, we generate some errors. In our Application\Controller\IndexController
:
public function indexAction()
{
$e = $a['i']; // this is Notice
asd(); // this is Fatal
return new ViewModel();
}