DocumentationDiscussions
DocumentationDiscussions
Hey! These docs are for version 5.1, which is no longer officially supported. Click here for the latest version, 2022.1!

Collecting Docker Container Logs

The easiest way for applications running in a Docker container to log to Seq is to use a native logging library and HTTP ingestion. Some applications, however, will choose to write plain text or JSON to STDOUT or STDERR, and have the Docker logging infrastructure route this to an appropriate log file or collector.

Seq supports the Docker logging infrastructure by accepting events in the GELF format. The output from any Docker container can be collected by configuring its logging driver on startup:

$ docker run \
    --rm \
    -it \
    --log-driver gelf \
    --log-opt gelf-address=udp://seq.example.com:12201 \
    hello-world:latest

In this example, --log-driver gelf instructs Docker to output logs using the GELF logging driver, while --log-opt gelf-address=udp://seq.example.com:12201 directs Docker to send logs via UDP to the specified host/port pair.

📘

GELF ingestion must be explicitly enabled in Seq using these instructions.


Did this page help you?