vlinde/laravel-bugster

See any errors by category!

V4.0.5 2024-02-27 13:21 UTC

README

Latest Version on Packagist Total Downloads Build Status StyleCI

Auto-detects every log file in the storage/logs folder and sorts all the errors by date.

Update ^1.1.2 custom categories and directories were added ( check config file )

Installation

Via Composer

$ composer require vlinde/laravel-bugster

Publish vendor for migrations then migrate

$ php artisan vendor:publish --tag=migrations
$ php artisan vendor:publish --tag=bugster.config
$ php artisan migrate

Usage

Add function to exception handler found in 'app/Exceptions/Handler.php'

public function renderForConsole($output, Throwable $e) 
{
    $bugster = new BugsterLoadBugs();
    $bugster->saveError($output, $e, null, 'TERMINAL');
    
    parent::renderForConsole($output, $e);
}

public function render($request, Throwable $e) 
{
    $render = parent::render($request, $e);

    $bugster = new BugsterLoadBugs;
    $bugster->saveError($request, $e, $render->getStatusCode());
    
    return $render;
}

How to move data to SQL

$ php artisan bugster:movetosql

How to delete older bugs

$ php artisan bugster:delete

You can add these commands to cron

$schedule->command('bugster:movetosql')->daily('00:30');
$schedule->command('bugster:delete')->daily('01:00');
$schedule->command('bugster:notify:statistics')->dailyAt('12:00');
$schedule->command('bugster:count-status-codes')->dailyAt('03:00');

Nova

Register Bugster tool in NovaServiceProvider

use Vlinde\Bugster\Bugster;

public function tools()
{
    return [
        new Bugster;
    ];
}

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.