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...]
Options:
--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.