Turn off for certain environments.
tonglil opened this issue · 7 comments
How can I disable the provider on an environment basis?
For example, previously I set rollbar => null
in the services.php config file and it wouldn't try registering it.
Now it throws the error of "access token not configured".
Is there another way to conditionally disable the provider based on environment?
In your services file of your environment configuration folder use this snippet.
For example: path/to/your/application/app/config/development/services.php
'rollbar' => array(
'access_token' => 'CHANGE_WITH_YOUR_KEY',
'level' => 'none'
)
The thing is, I don't want to give it a key for certain environments because I don't want it to report for those environments.
If you use what I have given you it won't report anything because it doesn't matter what key you use but what level you set.
I use it for my company and it doesn't report anything when I am working on my local environment.
Il giorno 07/ago/2015, alle ore 20:40, Tony Li notifications@github.com ha scritto:
The thing is, I don't want to give it a key for certain environments because I don't want it to report for those environments.
—
Reply to this email directly or view it on GitHub.
Gotcha, so any random key would work?
I am not sure, but again what matters is the reporting level you set, not the key.
Il giorno 07/ago/2015, alle ore 21:12, Tony Li notifications@github.com ha scritto:
Gotcha, so any random key would work?
—
Reply to this email directly or view it on GitHub.
You could also not load the service provider for development.
Thanks, that works well too!