Skip to content

GMBN/LogBug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogBug Errors Notifier for Zend Framework 2

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'
                ]
            ]
        ]
    ]
];

About

Logging and send mail of ZF2 exceptions and errors php

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages