Can docker have multiple logging drivers?

No, you can only specify a single logging driver/container.

To have separate sinks for your logs, you'd have to rely on something like fluentd to receive the logs (or read the json log files) and configure a pipeline to distribute them.


Dual logging is available in docker CE since version 20.10.1.

The feature was previously only available in Docker Enterprise since version 18.03.1-ee-1.

The official documentation chapter "Dual Logging" doesn't reflect this (as of 2021-01-04 ).

The feature has been open-sourced in pull request #40543 and was merged into master on 2020-02-27.

The related GitHub issue #17910 in moby/moby was closed with the following comment:

The upcoming Docker 20.10 release will come with the feature described above ("dual logging"), which uses the local logging driver as a ring-buffer, which makes docker logs work when using a logging driver that does not have "read" support (for example, logging drivers that send logs to a remote logging aggregator).


As of 18.03, Docker Engine Enterprise(EE) supports multiple log drivers, but it is not in the Community Edition(CE):

https://docs.docker.com/ee/engine/release-notes/#18031-ee-1-2018-06-27