gmbn/logbug

Logging of ZF2 exceptions and errors

Installs: 40

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/gmbn/logbug

dev-master 2016-11-29 15:23 UTC

This package is not auto-updated.

Last update: 2025-10-12 01:51:42 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'
                ]
            ]
        ]
    ]
];