-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print api request and response information to the console when log-level=debug #10053
Comments
@jwhonce can you give the history here? I cannot quite remember it. |
@baude We do this already on the service side for inbound API calls when started with /cc @vrothberg |
This definitely seems worthwhile. We just added support for trace logging, and this is a good candidate. |
Is there risk here of divulging secrets in logs? Do we need to be careful? |
Hm. If we use TRACE level, and add a warning to the manpage that Trace will print everything, even potentially privileged data - would that be OK? |
Yes, I am fine with it printing in tracelevel. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
@jwhonce any chance you can work on this? |
A friendly reminder that this issue had no activity for 30 days. |
@rhatdan Researching into how to implement this and still stream in and out of handler. Holding whole payload in memory seems wasteful. |
A friendly reminder that this issue had no activity for 30 days. |
@jwhonce any progress? |
* To aid in debugging log API request and response bodies at trace level. Events can be correlated using the X-Reference-Id. * Server now echos X-Reference-Id from client if set, otherwise generates an unique id. * Move logic for X-Reference-Id into middleware * Change uses of Header.Add() to Set() when setting Content-Type * Log API operations in Apache format using gorilla middleware * Port server code to use BaseContext and ConnContext Fixes containers#10053 Signed-off-by: Jhon Honce <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
In order to make troubleshooting easier it would be nice if podman would print api request and response information to the console when log-level=debug. This should include include all headers including tokens, request methods, request uri, payloads, etc. There should be enough to reconstruct the api calls using curl. the 'oc' command from OpenShift does this very nicely when you add lots of -vvvvvvv's.
Since some of the payloads can be large, more granular options for verbosity could be implemented. It's not so useful to get a tar file printed to my console, but I definitely want to be able to see the json of a manifest write operation.
Steps to reproduce the issue:
do something with podman that would initiate communication with a registry endpoint
add log-level=debug to cli
observe output and wish that it included api request and response information
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
podman version 3.0.1
Additional environment details (AWS, VirtualBox, physical, etc.):
fedora 33
The text was updated successfully, but these errors were encountered: