# docker compose logs: View Service Logs in CI

> How docker compose logs works: viewing aggregated service logs, following, tailing per service, and debugging failed CI stacks.

Source: https://latchkey.dev/learn/command-reference/docker-compose-logs  
Updated: 2026-06-25

See the aggregated logs of every service in the stack.

docker compose logs shows logs from one or more services, prefixed by service name. This page covers following, tailing, and dumping logs when a CI stack fails.

## What it does

docker compose logs aggregates stdout/stderr across services with a colored service prefix. You can scope to specific services and follow or tail like docker logs.

## Common usage

```Terminal
docker compose logs
docker compose logs -f api
docker compose logs --tail 100 db
docker compose logs --no-color > stack.log
```

## Common errors in CI

When a compose-based CI job fails, dump docker compose logs --no-color in an always() step so you can see why a service crashed - without it the failure is opaque. logs -f follows forever and will hang a non-interactive job; use a bounded form (no -f, or --tail) in CI. Empty logs usually mean the service writes to a file, not stdout.

## FAQ

### docker compose logs: View Service Logs in CI?

docker compose logs shows logs from one or more services, prefixed by service name. This page covers following, tailing, and dumping logs when a CI stack fails.

### What it does?

docker compose logs aggregates stdout/stderr across services with a colored service prefix. You can scope to specific services and follow or tail like docker logs.

### Common errors in CI?

When a compose-based CI job fails, dump docker compose logs --no-color in an always() step so you can see why a service crashed - without it the failure is opaque. logs -f follows forever and will hang a non-interactive job; use a bounded form (no -f, or --tail) in CI. Empty logs usually mean the service writes to a file, not stdout.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
