Ensure that changes to logs.restApi settings are propagated to all methods #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
If you use this plugin then after deploying attempt to change logging settings in serverless.yml, then it will not update, because all methods have overridden settings from the stage settings and serverless will only update the default settings.
Proposed Fix
As well as updating caching settings, copy the logs settings from
*/*
to ensure that any changes to them are maintained and applied at the method level. By copying from*/*
we also ensure that a serverless.yml using a shared API Gateway can copy the settings properly even though they are defined elsewhere in another serverless.yml (or defined via Terraform or otherwise.)