From e30532cf3fc74d899ba995e74598e3bc06988a9f Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 5 Feb 2015 16:24:47 -0800 Subject: [PATCH] Fail docker logs on all logging drivers apart from 'json-file' Signed-off-by: Alexander Morozov --- docs/sources/reference/commandline/cli.md | 3 +++ docs/sources/reference/run.md | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index c617c9a16a..b6a2bad0ad 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -1449,6 +1449,9 @@ For example: -t, --timestamps=false Show timestamps --tail="all" Number of lines to show from the end of the logs +NOTE: this command is available only for containers with `json-file` logging +driver. + The `docker logs` command batch-retrieves logs present at the time of execution. The `docker logs --follow` command will continue streaming the new output from diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index 23bdd4e7f8..052a35823e 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -646,13 +646,15 @@ familiar with using LXC directly. You can specify a different logging driver for the container than for the daemon. -### Log driver: none +### Logging driver: none -Disables any logging for the container. +Disables any logging for the container. `docker logs` won't be available with +this driver. ### Log driver: json-file -Default logging driver for Docker. Writes JSON messages to file. +Default logging driver for Docker. Writes JSON messages to file. `docker logs` +command is available only for this logging driver ## Overriding Dockerfile image defaults