This epic covers a bunch of improvements we'd like to make to the `logs` command. - ~~default to not following (similar to `docker logs`) (#2187, #1549)~~ in 1.7.0 - ~~support `-f, --follow` (the current behaviour) to keep following log output~~ in 1.7.0 - ~~support `--tail=<num>` to only show a number of lines from the end of the log (#1083, #265)~~ in 1.7.0 - ~~`-t, --timestamp` to add timestamps to the logs (https://github.com/docker/compose/issues/2227#issuecomment-171815635)~~ in 1.7.0 - ~~if a new container is started while `logs` is running, logs for that container should start to show up in the log stream (#1115)~~ in 1.7.0 - ~~if the log stream is done (the containers have stopped) logs should exit (#1866)~~ in 1.7.0 - ~~flush the buffer more frequently to deal with buffered output (#1060, #1549)~~ Fixed in 1.5.1 - continue printing logs after the first SIGINT until all containers exit (or we get another SIGINT) (#592) - `--json` output the raw json lines (#2156) #1866 includes a proposal for how to support many of these features
This epic covers a bunch of improvements we'd like to make to the
logscommand.default to not following (similar toin 1.7.0docker logs) (docker-compose logsbehavior is different fromdocker logs#2187, Flush log buffer when printing logs #1549)supportin 1.7.0-f, --follow(the current behaviour) to keep following log outputsupportin 1.7.0--tail=<num>to only show a number of lines from the end of the log (Feature: Ability to clear log history #1083, limit fig log #265)in 1.7.0-t, --timestampto add timestamps to the logs (Improvements todocker-compose logs#2227 (comment))if a new container is started whilein 1.7.0logsis running, logs for that container should start to show up in the log stream (''docker-compose logs'' does not show logs for new containers #1115)if the log stream is done (the containers have stopped) logs should exit (logs doesn't exit if the container is already stopped #1866)in 1.7.0flush the buffer more frequently to deal with buffered output (container logs are missing whenFixed in 1.5.1fig upby Webstorm #1060, Flush log buffer when printing logs #1549)--jsonoutput the raw json lines (json-file logs are not valid JSON #2156)logs doesn't exit if the container is already stopped #1866 includes a proposal for how to support many of these features