Add HTTP debug logging for Docker API calls #533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive HTTP debug logging for Docker API calls to aid in troubleshooting and debugging issues with the Docker client integration.
Changes
wrappedTransport) that intercepts Docker API requests and responsesgetDockerClient: Updated to automatically apply the debug transport when log level is set to debug or higher--log-levelflag description to list all available log levels (panic, fatal, error, warn, info, debug, trace) and indicate that 'debug' and 'trace' levels enable Docker API loggingExample Output
Info Level (default)
Debug Level
Trace Level
Files Changed
cmd/server.go: Updated--log-levelflag help text to document available levels and Docker API logging behaviorlibdocker/client.go: Modified to conditionally apply debug transport based on log levellibdocker/debug.go: New file implementing the HTTP debug transport wrapperlibdocker/debug_test.go: Comprehensive tests for debug transport functionalitylibdocker/client_test.go: Tests forgetDockerClientwith debug transport integrationBenefits
Fixes #532
🤖 Generated with Claude Code