nerdexam
Docker

DCA · Question #138

Your organization has a centralized logging solution, such as Splunk. Will this configure a Docker container to export container logs to the logging solution? Solution: docker logs <container-id>

The correct answer is B. No. The docker logs command retrieves existing logs from a container's configured logging driver for display, but it does not configure the container to export logs to an external solution.

Submitted by femi9· Apr 18, 2026Installation and Configuration

Question

Your organization has a centralized logging solution, such as Splunk. Will this configure a Docker container to export container logs to the logging solution? Solution: docker logs <container-id>

Options

  • AYes
  • BNo

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    93% (27)

Why each option

The `docker logs` command retrieves existing logs from a container's configured logging driver for display, but it does not configure the container to export logs to an external solution.

AYes

This command only serves to view existing container logs locally; it provides no mechanism to establish or modify a connection for forwarding logs to an external logging service.

BNoCorrect

The `docker logs <container-id>` command is used to fetch and display logs that have already been generated by a running container and stored by its configured logging driver. It does not initiate or configure the export of these logs to an external centralized logging solution such as Splunk.

Concept tested: Docker log retrieval vs. logging driver configuration

Source: https://docs.docker.com/engine/reference/commandline/logs/

Topics

#Docker logging#Logging drivers#`docker logs` command#Centralized logging

Community Discussion

No community discussion yet for this question.

Full DCA Practice