LaraBug
Laravel 5.8/6.x/7.x/8.x package for logging errors to larabug.com
Installation
You can install the package through Composer.
composer require larabug/larabug
Then publish the config and migration file of the package using artisan.
php artisan vendor:publish --provider="LaraBug\ServiceProvider"
And adjust config file (config/larabug.php
) with your desired settings.
Note: by default only production environments will report errors. To modify this edit your larabug configuration.
Configuration variables
All that is left to do is to define 2 env configuration variables.
LB_KEY=
LB_PROJECT_KEY=
LB_KEY
is your profile key which authorises your account to the API.
LB_PROJECT_KEY
is your project API key which you receive when creating a project.
Get these variables at larabug.com
Reporting unhandled exceptions
You can use LaraBug as a log-channel by adding the following config to the channels
section in config/logging.php
:
'channels' => [
// ...
'larabug' => [
'driver' => 'larabug',
],
],
After that you have configured the LaraBug channel you can add it to the stack section:
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'larabug'],
],
//...
],
License
The larabug package is open source software licensed under the license MIT