1DOCKER(1)                          JUNE 2014                         DOCKER(1)
2
3
4

NAME

6       docker-logs - Fetch the logs of a container
7
8
9

SYNOPSIS

11       docker logs [-f|--follow] [--help] [--since[=SINCE]] [-t|--timestamps]
12       [--tail[="all"]] CONTAINER
13
14
15

DESCRIPTION

17       The docker logs command batch-retrieves whatever logs are present for a
18       container at the time of execution. This does not guarantee execution
19       order when combined with a docker run (i.e., your run may not have
20       generated any logs at the time you execute docker logs).
21
22
23       The docker logs --follow command combines commands docker logs and
24       docker attach. It will first return all logs from the beginning and
25       then continue streaming new output from the container's stdout and
26       stderr.
27
28
29       Warning: This command works only for the json-file or journald logging
30       drivers.
31
32
33

OPTIONS

35       --help
36         Print usage statement
37
38
39       --details=true|false
40          Show extra details provided to logs
41
42
43       -f, --follow=true|false
44          Follow log output. The default is false.
45
46
47       --since=""
48          Show logs since timestamp
49
50
51       -t, --timestamps=true|false
52          Show timestamps. The default is false.
53
54
55       --tail="all"
56          Output the specified number of lines at the end of logs (defaults to
57       all logs)
58
59
60       The --since option can be Unix timestamps, date formatted timestamps,
61       or Go duration strings (e.g. 10m, 1h30m) computed relative to the
62       client machine's time. Supported formats for date formatted time stamps
63       include RFC3339Nano, RFC3339, 2006-01-02T15:04:05,
64       2006-01-02T15:04:05.999999999, 2006-01-02Z07:00, and 2006-01-02. The
65       local timezone on the client will be used if you do not provide either
66       a Z or a +-00:00 timezone offset at the end of the timestamp.  When
67       providing Unix timestamps enter seconds[.nanoseconds], where seconds is
68       the number of seconds that have elapsed since January 1, 1970 (midnight
69       UTC/GMT), not counting leap  seconds (aka Unix epoch or Unix time), and
70       the optional .nanoseconds field is a fraction of a second no more than
71       nine digits long. You can combine the --since option with either or
72       both of the --follow or --tail options.
73
74
75       The docker logs --details command will add on extra attributes, such as
76       environment variables and labels, provided to --log-opt when creating
77       the container.
78
79
80

HISTORY

82       April 2014, Originally compiled by William Henry (whenry at redhat dot
83       com) based on docker.com source material and internal work.  June 2014,
84       updated by Sven Dowideit ⟨SvenDowideit@home.org.au⟩ July 2014, updated
85       by Sven Dowideit ⟨SvenDowideit@home.org.au⟩ April 2015, updated by
86       Ahmet Alp Balkan ⟨ahmetalpbalkan@gmail.com⟩ October 2015, updated by
87       Mike Brown ⟨mikebrow@gmail.com⟩
88
89
90
91Docker Community              Docker User Manuals                    DOCKER(1)
Impressum