Ship Container logs using the Syslog driver


Configure your Docker container to use the syslog logging driver, and have Docker forward the logs to Loom

Release or Environment

Sophie standalone versions 3.4.x - 3.7.x


NOTE - the recommended approach to streaming container logs is to run the Loom collector-container alongside your containers, as outlined in this article.
If running Kubernetes, we recommend installing a DaemonSet, as described in this article.

You can also log to the local Syslog daemon and have it relay to Loom, as explained in the Syslog integration article.

To configure Docker to use the syslog driver, run your container with the following flags:

--log-opt syslog-address=tcp+tls://[your-subdomain]
--log-opt syslog-tls-ca-cert=/etc/ca-certificates/custom/ca.pem
--log-opt syslog-tls-cert=/etc/ca-certificates/custom/cert.pem
--log-opt syslog-tls-key=/etc/ca-certificates/custom/key.pem
--log-opt syslog-format=rfc3164
--log-opt tag="application-name"

* Replace your-subdomain and application-name with the appropriate values.

To have Compose use the syslog driver, in your docker-compose configuration file, configure the same options as listed above, but use the appropriate YAML syntax, as detailed in the official documentation.