Use --format to get active logging driver

This approach works on all platforms, and reduces the dependency
on external tools (`grep` in this case).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-11-21 14:00:09 +01:00
parent 8f36e28ad5
commit aa77505b67
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 3 additions and 3 deletions

View File

@ -55,12 +55,12 @@ the default output for commands such as `docker inspect <CONTAINER>` is JSON.
To find the current default logging driver for the Docker daemon, run To find the current default logging driver for the Docker daemon, run
`docker info` and search for `Logging Driver`. You can use the following `docker info` and search for `Logging Driver`. You can use the following
command on Linux, macOS, or PowerShell on Windows: command:
```bash ```bash
$ docker info | grep 'Logging Driver' $ docker info --format '{{.LoggingDriver}}'
Logging Driver: json-file json-file
``` ```
## Configure the logging driver for a container ## Configure the logging driver for a container