Skip to content

Enhancement: "log driver / opts" missing in docker service inspect pretty-print #1943

Description

@thaJeztah

Noticed that the logging-driver and options are not included in the --format=pretty output for a service.

Create a service with a custom logging driver and -options set;

docker service create --log-driver=json-file --log-opt max-file=5 --name loggie nginx:alpine

Inspect the service in JSON format, and notice that the options are set:

docker service inspect --format='{{json .Spec.TaskTemplate.LogDriver}}' loggie
{"Name":"json-file","Options":{"max-file":"5"}}

Inspect the service using the "pretty-print" format, and notice that the logging options are missing:

docker service inspect --format=pretty loggie

ID:		243u3kmrhw62f5ja4gh0gf0mr
Name:		loggie
Service Mode:	Replicated
 Replicas:	1
UpdateStatus:
 State:		completed
 Started:	17 minutes ago
 Completed:	17 minutes ago
 Message:	update completed
Placement:
UpdateConfig:
 Parallelism:	1
 On failure:	pause
 Monitoring Period: 5s
 Max failure ratio: 0
 Update order:      stop-first
RollbackConfig:
 Parallelism:	1
 On failure:	pause
 Monitoring Period: 5s
 Max failure ratio: 0
 Rollback order:    stop-first
ContainerSpec:
 Image:		nginx:alpine@sha256:366c39a589f69a893368d942d9d323893025e8c27a523657ba3a2119dfc66057
 Init:		false
Resources:
Endpoint Mode:	vip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions