Docker Community Forums

Share and learn in the Docker community.

Is it possible to set the logging driver?


(Markus Klepp) #1

I want to analyse my logs in my preferred logging tool, is it possible to configure the logging driver for my services/containers?


(Kostasmistos) #2

You should check first the original documentation here (if you have seen it yet) and also the logspout tool which runs as a container, bind the docker socket and collects every log from all containers running in the same docker host, You can redirect the logs from logspout to wherever you want (syslog, logstasth, etc… or implement your own plugin). Have fun!!


(Markus Klepp) #3

Thanks for your answer, but that’s not what I’m looking for.

Are there any plans to implement this logging feature of docker-compose.yml in a stack-file?


(Kickingthetv) #4

Hi Markus,

In the coming months, we’ll be working to integrate the Docker OSS in Docker Cloud, such as Compose, Libnetwork, and Swarm. At this point we’ll be up to date with all of the latest Compose features.


(Markus Klepp) #5

Thanks. Good to know


(Louis Borsu) #6

Yes adding the ability to specify the logging driver would a plus!


(Joe Goggins) #7

Is it possible to set the log-driver option for docker engines in a Node Cluster without provisioning Docker Cloud nodes yourself (BYON)?

I like the fact the Docker Cloud takes care of raw metal EC2 instance provisioning for my Node Clusters and would prefer to not have to provision nodes myself to set --log-driver=fluentd. I’m looking for a way to have Docker Cloud continue to provision my Node’s, but allow for me to make some very small changes to the docker daemon config.


(Marko Ciric) #8

Hi all, hope you’re having a great time playing with Docker. What is the status on this? I too have a need for a Stackfile to understand log-driver and log-opt, at least for syslog logging…

PS. I apologize if there’s a ROADMAP somewhere for Docker Cloud. If yes, please point me to the right direction.


(Kasper Veenvliet) #9

Same question here. Is this possible already? Or should we use logspout?


(Phil) #10

Exact same question as well. Has this been implemented? There is a list of unsupported keys between stack and compose here - https://docs.docker.com/docker-cloud/apps/stack-yaml-reference/#/unsupported-docker-compose-keys
But logs is not there, yet when I try and use them the UI hangs indefinitely.


(Nick Breen) #11

In the coming months …

April '17 checking in. I see that swarm mode (beta) seems to be the new direction for docker cloud and includes CloudWatch container logging as an option when creating a new swarm. Can we still reasonably expect the logging driver feature to be available in ‘classic mode’?


(Kickingthetv) #12

Cloud doesn’t support log drivers in our stacks YAML file or Service API. A workaround for this would be to BYON configuring the daemon options choosing the log driver (DockerOpts in the DockerCloud Agent config file). Please note that most log drivers don’t support docker logs command (ref https://docs.docker.com/engine/admin/logging/overview/#limitations-of-logging-drivers)

BYON feature: https://docs.docker.com/docker-cloud/infrastructure/byoh/
GitHub Repo: https://github.com/docker/dockercloud-agent


(Nick Breen) #13

I suppose one could retroactively configure this on a non-BYON node by editing the config (/etc/dockercloud/agent/dockercloud-agent.conf) file.

So automate it, a derivitive of the SSH Authorised Keys container (https://docs.docker.com/docker-cloud/infrastructure/ssh-into-a-node/) or perhaps the docker-cloud agent container itself could be used to automatically reconfigure the docker-cloud agent and set the log driver to awslog.