Automation, Orchestration, and Scripting

A web application started with Compose is returning errors. The administrator wants to watch new log output from only the db service as it is written, from the project directory. Which command does this?

Show the answer

Correct answerC. docker compose logs -f db

logs -f follows the output of the named service and keeps streaming new lines. Without -f, logs prints the existing output once and exits, so new entries are not shown. ps and top show status and processes, not logs.