---
title: "Get service logs"
method: GET
path: "/services/{id}/logs"
tags: ["Service"]
---

# Get service logs

`GET /services/{id}/logs`

Get `stdout` and `stderr` logs from a service. See also
[`/containers/{id}/logs`](#operation/ContainerLogs).

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

## Path parameters

- `id` string, required

## Query parameters

- `details` boolean
- `follow` boolean
- `stdout` boolean
- `stderr` boolean
- `since` integer
- `timestamps` boolean
- `tail` string

## Response `200`

logs returned as a stream in response body

## Other responses

- `404` — no such service
- `500` — server error
- `503` — node is not part of a swarm

---

[API](https://skmtc.net/moby/apis/docker-engine-api.md) · [All operations](https://skmtc.net/moby/apis/docker-engine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/moby/docker-engine-api/versions/4752769870da/schema)
