Forwarding logs from all containers running anywhere inside a Swarm cluster

How can we forward logs from all the containers no matter where they’re running? One possible solution would be to configure logging drivers (https://docs.docker.com/engine/admin/logging/overview/). We could use the --log-driver argument to specify a driver for each service. The driver could be syslog or any other supported option. That would solve our log shipping problem. However, using the argument for each service is tedious and, more importantly, we could easily forget to specify it for a service or two and discover the omission only after we encounter a problem and are in need of logs. Let's see if there is another option to accomplish the same result.

We could ...

Get The DevOps 2.1 Toolkit: Docker Swarm now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.