Skip to content

Document log file location for json-file driver#24724

Closed
dvdksn wants to merge 1 commit intodocker:mainfrom
dvdksn:fix/issue-22851-json-file-log-location
Closed

Document log file location for json-file driver#24724
dvdksn wants to merge 1 commit intodocker:mainfrom
dvdksn:fix/issue-22851-json-file-log-location

Conversation

@dvdksn
Copy link
Copy Markdown
Contributor

@dvdksn dvdksn commented Apr 14, 2026

Summary

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
(/var/lib/docker/containers/<id>/<id>-json.log), its dependency on the
daemon data root directory, Docker Desktop behavior, and the
docker inspect --format='{{.LogPath}}' command.

Closes #22851

Generated by Claude Code

…ocker#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 <noreply@anthropic.com>
@dvdksn dvdksn added the status/review Pull requests that are ready for review label Apr 14, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 14, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 66e8251
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/69de1a4af3a512000806c41d
😎 Deploy Preview https://deploy-preview-24724--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dvdksn dvdksn requested review from a team and thaJeztah April 14, 2026 10:43
@thaJeztah
Copy link
Copy Markdown
Member

These files are an implementation detail, and are meant to be exclusively accessed by the daemon; we should probably not document them; it's why we added the warning as well; https://docs.docker.com/engine/logging/drivers/json-file/

Screenshot 2026-04-14 at 15 41 38

@thaJeztah
Copy link
Copy Markdown
Member

Basically, these files are just a cache used by the daemon; the docker logs (and equivalent API endpoint(s)) are the way to consume those logs.

@dvdksn dvdksn closed this Apr 14, 2026
@dvdksn
Copy link
Copy Markdown
Contributor Author

dvdksn commented Apr 14, 2026

@thaJeztah makes sense 👍

@dvdksn dvdksn deleted the fix/issue-22851-json-file-log-location branch April 14, 2026 13:56
@dvdksn dvdksn mentioned this pull request Apr 14, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Where are log files located

2 participants