Daemon Log Locations in Docker

  1. What Are Daemon Events
  2. Daemon Log Locations in Docker
Daemon Log Locations in Docker

The Docker daemon provides essential information about the general condition of your microservice architecture. Sadly, container-centric logging techniques allow you to gather relevant data from your services but provide scant to no information on the state of the Docker service.

This article will discuss Daemon events and where we can generally locate the Daemon logs for each Operating System (OS).

What Are Daemon Events

Daemon events are notifications on how the Docker service is currently functioning. Each event displays:

  1. The current timestamp
  2. The log level
  3. Details about the event

The Daemon’s events logs include specific information on the following:

  1. Actions performed during the initialization process
  2. Features provided by the host kernel
  3. The status of commands sent to containers
  4. The overall state of the Docker service
  5. The state of active containers

Daemon events frequently provide detailed information about the state of containers. For example, Daemon logs may look like the following:

time="2022-09-18T11:28:40.726969388-05:00" level=info msg="POST /v1.3/container/sample/stop?t=10"

The following section will discuss locating the Daemon logs in each operating system.

Daemon Log Locations in Docker

We may be able to identify issues using the Daemon logs. Depending on the operating system setup and the logging subsystem utilized, Docker may save the logs in one of a few places:

OS Location
Linux Use the command journalctl -xu docker.service (or read /var/log/messages or /var/log/syslog, depending on your Linux Distribution)
macOS Daemon dockerd logs ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
macOS Daemon containerd logs) ~/Library/Containers/com.docker.docker/Data/log/vm/containerd.log
Windows WSL2 Daemon dockerd logs %APPDATA%\Docker\log\vm\dockerd.log
Windows WSL2 Daemon containerd logs %APPDATA%\Docker\log\vm\containerd.log
General Windows Containers Windows Event Log via the Event Viewer
Marion Paul Kenneth Mendoza avatar Marion Paul Kenneth Mendoza avatar

Marion specializes in anything Microsoft-related and always tries to work and apply code in an IT infrastructure.

LinkedIn