Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

ecs-compose-features and ecs-compose-examples, inconsistencies in how logging configuration is described #2155

Open
@craig-osterhout

Description

@craig-osterhout

From: docker/docs#14589
File:

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-": {}}
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleInactive issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions