Closed ghost closed 12 years ago
There really isn't an issue here. You are free to declare the environment anyway you want the docs only give a suggestion. Are you saying just to change the docs?
Yes, I think the docs should be changed to my proposal above because this ensures that the environment in airbrake will have the same name as the Grails env. Remember that one can define environments in addition to dev, test, production.
However I also think that the env parameter should default to grails.util.Environment.current.name so that it can be omitted from the appender configuration, e.g.
def airbrakeAppender = new grails.plugins.airbrake.AirbrakeAppender(
name: 'airbrake',
api_key: '19467cfa091f0eb6e51c6350647bf213',
filtered_keys: ['password'])
Similarly, name could be given a default value of 'airbrake' so that the only required parameter is the api_key
please just submit the pull request
I agree. This is something that I would like to see as well. Please submit the pull request.
If the appender is configured as per the example in the docs
then when the app is running in the dev environment, the errors are logged in airbrake in the production environment. I tried using the configuration below instead:
and it seems to resolve this problem. Perhaps it would make sense to use the above as the default value for the env property of AirbrakeAppender?