LinuxCommandLibrary

docker-compose-logs

view compose service logs

TLDR

View logs from all services

$ docker compose logs
copy
Follow log output
$ docker compose logs -f
copy
View logs for specific service
$ docker compose logs [service_name]
copy
Show timestamps
$ docker compose logs -t
copy
Limit output lines
$ docker compose logs --tail [100]
copy
Since specific time
$ docker compose logs --since [1h]
copy

SYNOPSIS

docker compose logs [options] [service...]

DESCRIPTION

docker compose logs displays log output from services defined in the Compose file. Aggregates logs from all containers of each service.

PARAMETERS

-f, --follow

Follow log output.
-t, --timestamps
Show timestamps.
--tail n
Number of lines from end.
--since time
Show logs since timestamp or relative time.
--until time
Show logs before timestamp or relative time.
--no-color
Produce monochrome output.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community