jenssegers/laravel-rollbar

Turn off on development

Closed this issue ยท 6 comments

Hi,

first thanks for this package, good work ๐Ÿ‘

Could you tell me how i can disable this package / notifications on my local development?

Here you go. In exceptions/Handler.php

    public function report(Exception $e)
    {
        if (App::environment('production')) {
            Log::error($e);
        }

        return parent::report($e);
    }

@pedrommone Awesome, thank you ๐Ÿ‘

@pedrommone this doesn't work for fatal errors due to the register_shutdown_function call in the serviceprovider. What do you recommend for disabling that as well in development?

@mbardelmeijer we're noticied that too, currently I have no tip for you :(

@pedrommone Just out of curiosity, what's the difference with your code snippet when the parent Handler logs errors anyway? Perhaps I'm missing something?

@edbentinck sorry for delay. We change this piece of code when I noticed it as well! :) now is something like this

    public function report(Exception $e)
    {
        if (App::environment('production')) {
            Log::error($e);
            return parent::report($e);
        }
    }