Package Data | |
---|---|
Maintainer Username: | rajinha92 |
Maintainer Contact: | rafael.conrado.farias@gmail.com (Rafael Conrado) |
Package Create Date: | 2017-07-29 |
Package Last Update: | 2019-08-02 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-06 03:06:37 |
Package Statistics | |
---|---|
Total Downloads: | 93 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
RLogger is a simple package to save exceptions thrown by laravel applications and show them in a more readable form.
You just need to require the composer package:
composer require rajinha92/rlogger
Next you need to add the ServiceProvider in your config/app.php
file.
config/app.php
'providers' => [
// ...
\RLogger\Providers\RLoggerServiceProvider::class,
],
Publish config and view files by typing in your terminal
php artisan vendor:publish
or
php artisan vendor:publish --provider="RLogger\Providers\RLoggerServiceProvider"
This package has a migration file, that create the rlogger table, so you have to run the command:
php artisan migrate
Last but not least, change your app\Exceptions\Handler.php
use RLogger\Traits\RLoggerReport;
...
use RLoggerReport;
...
//your report method should look like this
public function report(Exception $exception)
{
$this->rlog($exception);
}
The rlog
method will respect the shouldReport($exception)
contained in the class.
The rlogger route is under a basic authentication, so, you have to add the authorized users's id
return [
'rlogger_authorized_user_id' => env('RLOGGER_AUTHORIZED_USER_ID', 1), //here goes the id, can be an array too
'rlogger_laravel_report' => env('RLOGGER_LARAVEL_REPORT', false), //change to true if you want to automatically call parent::report($exception)
];
Now all the exceptions will be available under the url /rlogger