t4web/error-handler

ZF2 Module. For handle and log errors

1.0.2 2016-08-17 12:49 UTC

This package is auto-updated.

Last update: 2024-10-26 18:22:53 UTC


README

ZF2 Module. For handle and log errors

If enabled you can log all PHP errors\notices\warnings etc.

Installation

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

Post installation

Enabling it in your application.config.phpfile.

<?php
return array(
    'modules' => array(
        // ...
        'T4web\Log',
        'T4web\ErrorHandler',
    ),
    // ...
);

Introduction

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();
}

If you use t4web\admin in your logs you can see: backend error handler log entries