Logging on Linux Duo Authentication gateway


According to the docs, you access the logs on a Linux DAG with docker-compose -p access-gateway -f <yml file> logs -f > <filename>. As far as I can see this dumps everything into that one file, and takes a while to run. Is there a more fine-grained way to see, for example, logs from a particular time period? Or is the expectation that we just pipe it through grep?


The docker-compose logs command has a few options that could be useful:

$ docker-compose logs --help
View output from containers.

Usage: logs [options] [SERVICE...]

    --no-color          Produce monochrome output.
    -f, --follow        Follow log output.
    -t, --timestamps    Show timestamps.
    --tail="all"        Number of lines to show from the end of the logs
                        for each container.

If you’re actively debugging an issue, it can be useful to specify –tail=0 -f to only emit new log messages.

If you’re looking for logs from a past event, it’s best to dump to the file then grep through that file for the time or condition you’re looking for.