Service

Get service logs

Changed on

Get stdout and stderr logs from a service. See also /containers/{id}/logs.

Note: This endpoint works only for services with the local, json-file or journald logging drivers.

get/services/{id}/logs

Request

  • Base URL
    /v1.57 (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    none declared

Path parameters

idstring required

ID or name of the service

Query parameters

detailsboolean

Show service context and extra details provided to logs.

followboolean

Keep connection after returning logs.

stdoutboolean

Return logs from stdout

stderrboolean

Return logs from stderr

sinceinteger

Only return logs since this time, as a UNIX timestamp

timestampsboolean

Add timestamps to every log line

tailstring

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

Changes

    • breaking

      removed the media type application/octet-stream for the response with the status

    • info

      api tag Service added

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      for the query request parameter details, default value false was removed

    • breaking

      for the query request parameter follow, default value false was removed

    • breaking

      for the query request parameter since, default value 0 was removed

    • breaking

      for the query request parameter stderr, default value false was removed

    • breaking

      for the query request parameter stdout, default value false was removed

    • breaking

      for the query request parameter tail, default value all was removed

    • breaking

      for the query request parameter timestamps, default value false was removed

    • breaking

      for the query request parameter since, the format changed from no format to int32

    • breaking

      removed the media type application/vnd.docker.multiplexed-stream for the response with the status

    • breaking

      removed the media type application/vnd.docker.raw-stream for the response with the status

    • info

      api tag Service removed

    • info

      added the media type application/octet-stream for the response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status