Get container logs
GET /containers/(id)/logs
Get stdout
and stderr
logs from the container id
Note: This endpoint works only for containers with the
json-file
orjournald
logging drivers.
Example request:
Example response:
Query Parameters:
follow – 1/True/true or 0/False/false, return stream. Default
false
.stdout – 1/True/true or 0/False/false, show
stdout
log. Defaultfalse
.stderr – 1/True/true or 0/False/false, show
stderr
log. Defaultfalse
.since – UNIX timestamp (integer) to filter logs. Specifying a timestamp
will only output log-entries since that timestamp. Default: 0 (unfiltered)
timestamps – 1/True/true or 0/False/false, print timestamps for every log line. Default
false
.tail – Output specified number of lines at the end of logs:
all
or<number>
. Default all.
Status Codes:
101 – no error, hints proxy about hijacking
200 – no error, no upgrade header found
404 – no such container
500 – server error
Last updated