nerdexam
Docker

DCA · Question #139

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: Set the log-driver and…

The correct answer is A. Yes. Setting log-driver and log-opts in daemon.json configures a default logging driver for all new containers, enabling automatic log export to centralized solutions like Splunk.

Submitted by saadiq_pk· 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: Set the log-driver and log-oPt keys to values for the logging solution (Splunk) In the daemon.json file.

Options

  • AYes
  • BNo

How the community answered

(40 responses)
  • A
    90% (36)
  • B
    10% (4)

Why each option

Setting `log-driver` and `log-opts` in `daemon.json` configures a default logging driver for all new containers, enabling automatic log export to centralized solutions like Splunk.

AYesCorrect

By configuring the `log-driver` and `log-opts` keys in the `daemon.json` file, administrators can specify a default logging driver (like `splunk`) and its parameters (e.g., URL, token) for all containers created by the Docker daemon. This setup automatically routes container logs to the designated centralized logging solution, such as Splunk, as they are generated.

BNo

Modifying the `daemon.json` to define a global `log-driver` and its associated `log-opts` is the standard and correct method for configuring Docker to send container logs to a centralized logging solution like Splunk by default.

Concept tested: Docker daemon logging configuration

Source: https://docs.docker.com/config/containers/logging/configure/

Topics

#Logging#Log driver configuration#Daemon configuration#Centralized logging

Community Discussion

No community discussion yet for this question.

Full DCA Practice