compose icon indicating copy to clipboard operation
compose copied to clipboard

Add docker-compose logs -f for tailing log output

Open richardjortega opened this issue 11 years ago • 2 comments

Wondering if it's possible to update the docker-compose logs endpoint to use a -f for following log output.

Right now if you type docker-compose logs you have to wait for the logs to catch up. Depending on your app, this can take an extremely long time to catch up (typically in development or staging I have to run docker-compose kill && docker-compose up -d && docker-compose logs just so I don't have to wait for the log output to catch up.

The Docker Engine api already supports this on their docker logs endpoint with an -f option. docker logs -f <container>.

Essentially this Docker issue but for Compose https://github.com/docker/docker/issues/2997

richardjortega avatar Aug 17 '15 05:08 richardjortega

This would involve using the logs endpoint in docker-compose logs, as opposed to the attach endpoint, but I think that's fine.

It would also only work for containers using the json-file logging driver, according to the API docs.

aanand avatar Aug 17 '15 12:08 aanand

Duplicate of https://github.com/docker/compose/issues/265

aanand avatar Aug 17 '15 12:08 aanand