From a9bea1525ce36b2858841a697990db338c9be5d6 Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Tue, 3 Jun 2014 15:09:33 +0400 Subject: [PATCH] Implement tail for docker logs Fixes #4330 Docker-DCO-1.1-Signed-off-by: Alexandr Morozov (github: LK4D4) --- docs/sources/reference/commandline/cli.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 93b97b02f..52917f155 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -738,13 +738,15 @@ specify this by adding the server name. -f, --follow=false Follow log output -t, --timestamps=false Show timestamps + --tail="all" Output the specified number of lines at the end of logs (all logs by default) -The `docker logs` command batch-retrieves all logs -present at the time of execution. +The `docker logs` command batch-retrieves logs present at the time of execution. -The ``docker logs --follow`` command will first return all logs from the -beginning and then continue streaming new output from the container's `STDOUT` -and `STDERR`. +The `docker logs --follow` command will continue streaming the new output from +the container's `STDOUT` and `STDERR`. + +Passing a negative number or a non-integer to --tail is invalid and the +value is set to all in that case. This behavior may change in the future. ## port