jenssegers / laravel-rollbar

Rollbar error monitoring integration for Laravel projects
328 stars 98 forks source link

Turn off on development #43

Closed ChristopherDosin closed 8 years ago

ChristopherDosin commented 8 years ago

Hi,

first thanks for this package, good work :+1:

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

pedrommone commented 8 years ago

Here you go. In exceptions/Handler.php

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

        return parent::report($e);
    }
ChristopherDosin commented 8 years ago

@pedrommone Awesome, thank you :+1:

mbardelmeijer commented 8 years ago

@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?

pedrommone commented 8 years ago

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

edbentinck commented 8 years ago

@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?

pedrommone commented 8 years ago

@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);
        }
    }