When a stack restarts itself I’d like to know what happened and in which order. The Docker daemon has docker events for that, and Compose has its own version that is limited to your project.
docker compose events
docker compose events --json web
The docs describe it as streaming container events for every container in the project. You can name services at the end to narrow it down. With --json every event is one JSON object per line, with fields such as time, type, action, id, service and attributes. The attributes hold the container name and image, so the output is easy to filter with jq.
There are also --since and --until, which take a timestamp. The first one shows everything created since that moment, the second one stops the stream at a given time. Without --until the command keeps running until you press Ctrl+C.
Where I would use it: leave it running in one terminal while you run docker compose up or docker compose restart in another, and you see the sequence of create, start and die events per service.
The caveat is that this is a live stream of container events. It shows what Docker did to the containers, not what the applications printed, so for application output you still want docker compose logs.
Further reading: docker compose events