ecs-compose-features and ecs-compose-examples, inconsistencies in how logging configuration is described #2155
Description
From: docker/docs#14589
File:
- https://github.com/docker/compose-cli/blob/main/docs/ecs-compose-features.md
- https://github.com/docker/compose-cli/blob/main/docs/ecs-compose-examples.md
Problem: There are inconsistencies in how logging configuration is described. I'm not sure which is correct or I'd fix it myself.
File: cloud/ecs-compose-features.md
URL: https://docs.docker.com/cloud/ecs-compose-features/#logs
The page states:
CloudWatch can be customized by setting service logging.driver_opts by passing
But the code block uses driver-opts
instead of driver_opts
:
test:
image: mycompany/webapp
logging:
driver-opts:
awslogs-datetime-pattern: "some-pattern"
File: cloud/ecs-compose-examples.md
URL: https://docs.docker.com/cloud/ecs-compose-examples/#service
In the Service -> Logging section, logging is configured via an options
object instead of driver_opts
:
services:
foo:
image: nginx
logging:
options:
awslogs-datetime-pattern: "FOO"
URL: https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
And finally, the json-spec shows support for an options
object for logging. It does not appear to support driver_opts
.
"logging": {
"type": "object",
"properties": {
"driver": {"type": "string"},
"options": {
"type": "object",
"patternProperties": {
"^.+$": {"type": ["string", "number", "null"]}
}
}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
},