From 66e8251ea0645556adfa8d219e0ce1e869df1155 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 14 Apr 2026 12:39:58 +0200 Subject: [PATCH] docs: add log file location section to json-file driver page (fixes #22851) The json-file logging driver page described the log format and configuration options but never stated where the log files are stored on disk. Added a "Log file location" section documenting the default path, data root dependency, Docker Desktop behavior, and the docker inspect command for finding a container's log path. Co-Authored-By: Claude --- .../engine/logging/drivers/json-file.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/manuals/engine/logging/drivers/json-file.md b/content/manuals/engine/logging/drivers/json-file.md index 430ce7d7a69..d3f203d57a4 100644 --- a/content/manuals/engine/logging/drivers/json-file.md +++ b/content/manuals/engine/logging/drivers/json-file.md @@ -28,6 +28,28 @@ only one container. > with external tools may interfere with Docker's logging system and result in > unexpected behavior, and should be avoided. +## Log file location + +By default, Docker stores log files in the Docker data directory +(`/var/lib/docker` on Linux). The log file for a container is located at: + +```text +/var/lib/docker/containers//-json.log +``` + +If you configured the daemon to use a different +[data root directory](/manuals/engine/daemon/_index.md#configure-the-data-directory-location), +the log files are stored under that directory instead. + +On Docker Desktop, log files are stored inside the Docker Desktop VM and +aren't directly accessible from the host filesystem. + +To find the log file path for a specific container, run: + +```console +$ docker inspect --format='{{.LogPath}}' +``` + ## Usage To use the `json-file` driver as the default logging driver, set the `log-driver`