github.com/guilhermebr/docker@v1.4.2-0.20150428121140-67da055cebca/docs/man/docker-logs.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-logs - Fetch the logs of a container 6 7 # SYNOPSIS 8 **docker logs** 9 [**-f**|**--follow**[=*false*]] 10 [**--help**] 11 [**-t**|**--timestamps**[=*false*]] 12 [**--tail**[=*"all"*]] 13 CONTAINER 14 15 # DESCRIPTION 16 The **docker logs** command batch-retrieves whatever logs are present for 17 a container at the time of execution. This does not guarantee execution 18 order when combined with a docker run (i.e., your run may not have generated 19 any logs at the time you execute docker logs). 20 21 The **docker logs --follow** command combines commands **docker logs** and 22 **docker attach**. It will first return all logs from the beginning and 23 then continue streaming new output from the container’s stdout and stderr. 24 25 **Warning**: This command works only for **json-file** logging driver. 26 27 # OPTIONS 28 **--help** 29 Print usage statement 30 31 **-f**, **--follow**=*true*|*false* 32 Follow log output. The default is *false*. 33 34 **-t**, **--timestamps**=*true*|*false* 35 Show timestamps. The default is *false*. 36 37 **--tail**="all" 38 Output the specified number of lines at the end of logs (defaults to all logs) 39 40 # HISTORY 41 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 42 based on docker.com source material and internal work. 43 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 44 July 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>