shootkiran/merobug

Save Exceptions of Laravel into Database.Inspired by larabug

Fund package maintenance!
cannonb4ll

dev-master 2024-03-16 14:34 UTC

This package is auto-updated.

Last update: 2024-05-16 15:00:01 UTC


README

68747470733a2f2f7777772e6d65726f6275672e636f6d2f696d616765732f6d65726f6275672d6c6f676f2d736d616c6c2e706e67

MeroBug

Laravel 6.x/7.x/8.x/9.x package for logging errors to database

Installation on laravel

You can install the package through Composer.

composer require shootkiran/merobug

Then publish the config and migration file of the package using the vendor publish command.

php artisan vendor:publish --provider="MeroBug\ServiceProvider"

And adjust config file (config/merobug.php) with your desired settings.

Note: by default only production environments will report errors. To modify this edit your MeroBug configuration.

Reporting unhandled exceptions

You can use MeroBug as a log-channel by adding the following config to the channels section in config/logging.php:

'channels' => [
    // ...
    'merobug' => [
        'driver' => 'merobug',
    ],
],

After that you can add it to the stack section:

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'merobug'],
    ],
    //...
],

PS: If you're using lumen, it could be that you don't have the logging.php file. So, you can use default logging file from framework core and make changes above.

php -r "file_exists('config/') || mkdir('config/'); copy('vendor/laravel/lumen-framework/config/logging.php', 'config/logging.php');"

License

The MeroBug package is open source software licensed under the license MIT