Reputation: 16163
I'm using the Laravel Debugbar Package to display debug information. I'm noticing that the debug bar is logging errors to the log whenever an exception occurs. I would rather this doesn't happen, since I am running my own custom exception handler which collects information in the format I prefer and I have it logging to the log file as well.
So for example when I mistype a route name, I get the message saved twice to the log file:
[2015-02-11 16:21:02] local.ERROR: Method [fdfdgfd] does not exist.
[2015-02-11 16:21:04] local.ERROR: Debugbar exception: Method UserController::fdfdgfd() does not exist [] []
How can I disable exception logging with the Debugbar?
Upvotes: 2
Views: 5742
Reputation: 3455
To prevent or disable exception logging for Debugbar
package.
- For completely turn off log. open edit
.env
file and addDEBUGBAR_ENABLED
variable as false value
DEBUGBAR_ENABLED=false
- Just want to disable log files in storage directory.
Publish Debugbar
configuration file by following command
php artisan vendor:publish --provider=Barryvdh\Debugbar\ServiceProvider
you will get success message like.
Copied File [\vendor\barryvdh\laravel-debugbar\config\debugbar.php] To [\config\debugbar.php]
Publishing complete.
Open \config\debugbar.php
file
'storage' => [
'enabled' => false, /// here change it to false
'path' => storage_path('debugbar'),
],
Upvotes: 1
Reputation: 41
I know this is old, but in case anyone still needs an answer. Set
'storage' => [ 'enabled' => false, ]
In laravel-debugbar/config/debugbar.php
Upvotes: 4
Reputation: 22673
I have never seen this package, but it seems like it provides decent configuration.
Try to set this value to false
: https://github.com/barryvdh/laravel-debugbar/blob/1.8/src/config/config.php#L90
Upvotes: 0