shootkiran/merobug

Save Exceptions of Laravel into Database.Inspired by larabug

Fund package maintenance!
cannonb4ll

v1.0.0 2024-03-16 14:34 UTC

This package is auto-updated.

Last update: 2025-02-19 19:20:38 UTC


README

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