aws-ecs-1: add ecs.loglevel setting #1062
Merged
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.
Issue number:
#815
(Note: this overlaps with #1053 as it adds a new setting. I will update either this one or the other one depending on which gets merged first.)
Description of changes:
The log level for the ECS agent cannot be set using ecs.config.json. Instead, for this setting we use a template file which is then sourced as an EnvironmentFile in ecs.service.
This change also reduces the default logging level from "debug" (which is quite chatty) to "info" (which is the default on the ECS-optimized AMIs).
Testing done:
Built a new AMI. Observed that the correct default value was populated to
/etc/ecs/ecs.config
and that the ECS agent was logging at the correct level. Usedapiclient
to patch the value to "debug", committed the change, and observed the correct change to/etc/ecs/ecs.config
as well as the ECS agent's logging behavior. Usedapiclient
to try and set an invalid value, received an appropriate error response.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.