Get container logs
Get stdout and stderr logs from a container.
Note: This endpoint works only for containers with the json-file or journald logging driver.
Request
- Base URL/v1.49 (relative, and the document was published on a file host, not at the API’s origin)
- URL/v1.49/containers/{id}/logs
- Authnone declared
Path parameters
ID or name of the container
Query parameters
Keep connection after returning logs.
Return logs from stdout
Return logs from stderr
Only return logs since this time, as a UNIX timestamp
Only return logs before this time, as a UNIX timestamp
Add timestamps to every log line
Only return this number of log lines from the end of the logs. Specify as an integer or all to output all log lines.
Response
logs returned as a stream in response body. For the stream format, see the documentation for the attach endpoint. Note that unlike the attach endpoint, the logs endpoint does not upgrade the connection and does not set Content-Type.
Changes
No recorded changes to this operation across all 4 revisions of this API.