eslym/laravel-error-report

Better error reports for laravel

2.1.0 2019-07-26 05:12 UTC

This package is auto-updated.

Last update: 2024-04-26 15:56:57 UTC


README

Why this package exists? Sometimes errors happens on production but default error report does not log the environment variables and etc. It is hard to track the error with limited information but its too heavy for server to store all information. This package will detect repeated errors and store only limited sample for each error.

Installation

composer install eslym/laravel-error-report ^2.0

Usage

  1. Migrate database
  2. Use the report function
  3. Schedule cleanup
// app/Exceptions/Handler.php
...
    public function report(Exception $exception)
    {
        if($this->shouldReport($exception)){
            \Eslym\ErrorReport\Facades\Reporter::report($exception);
        }
    }
...
// app/Console/Kernel.php
$schedule->command('errors:cleanup')
         ->daily();