gmbn / logbug
Logging of ZF2 exceptions and errors
dev-master
2016-11-29 15:23 UTC
Requires
- php: >=5.4.0
- zendframework/zendframework: >=2.3.2,<3.0.0
This package is not auto-updated.
Last update: 2024-05-11 17:45:18 UTC
README
LogBug?
The LogBug Notifier for Zend Framework 2 gives you instant notifications of the errors in your application. Detect Handle and Catch E_* PHP errors , ‘dispatch.error’ and ‘render.error’ errors that handled by Framework
Install
Installation with the composer
php composer.phar require gmbn/logbug:dev-master
Enable it in your application.config.php
file
<?php return array( 'modules' => array( 'LogBug', // Must be added as the first module // ... ), // ... );
Configuration
Create directory data/logs
and make sure your application has write access to it.
Copy the config/logbug.local.php.dist
file to your config/autoload
folder and change the settings
<?php return [ "logbug" => [ "email" => [ "smtp" => [ 'host' => 'smtp.server.com', 'username' => 'error@server.com', 'password' => 'yourpassword', 'ssl' => 'tls', 'port' => 587, ], 'send' => [ 'from' => 'error@server.com', 'subject' => 'Error notification', //e-mails to receive notification 'to' => ['myteam@gmail.com', 'myteam2@mail.com'] ], 'ignore' => [ //ignore errors 'error' => [ 'E_NOTICE', // 'EXCEPTION_RENDER_ERROR', // 'EXCEPTION_DISPATCH_ERROR' ], //ignore error with code 'code'=>[ '403' ] ] ] ] ];