-
Notifications
You must be signed in to change notification settings - Fork 25
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
A flag for setting the log level and more verbose log output #220
Comments
/kind feature |
Still a problem in 0.1.49. We have already done something similar (logging HTTP requests and responses) in https://github.com/jetstack/venafi-connection-lib/pull/143, although I didn't log the responses for some reason... We should do something similar here. What makes me want to do this is because I've been in two "debugging sessions" with customers, and having a way to log HTTP traffic would be immensely helpful. |
We introduced a Which allows you to see the details of Kubernetes API requests but I don't think we've set up the logging to allow trace level log messages from venafi-connection-lib ...I'll look into that. I1120 16:30:38.027359 1 reflector.go:341] Listing and watching firefly.venafi.com/v1, Resource=issuers from k8s.io/client-go@v0.31.1/tools/cache/reflector.go:243
I1120 16:30:38.027838 1 round_trippers.go:466] curl -v -XGET -H "Accept: application/json" -H "User-Agent: preflight/v0.0.0 (linux/amd64) kubernetes/$Format" -H "Authorization: Bearer <masked>" 'https://34.118.224.1:443/apis/firefly.venafi.com/v1/issuers?limit=500&resourceVersion=0'
I1120 16:30:38.031924 1 round_trippers.go:553] GET https://34.118.224.1:443/apis/firefly.venafi.com/v1/issuers?limit=500&resourceVersion=0 404 Not Found in 4 milliseconds
I1120 16:30:38.032041 1 round_trippers.go:570] HTTP Statistics: GetConnection 0 ms ServerProcessing 3 ms Duration 4 ms
I1120 16:30:38.032137 1 round_trippers.go:577] Response Headers:
I1120 16:30:38.032236 1 round_trippers.go:580] Date: Wed, 20 Nov 2024 16:30:38 GMT
I1120 16:30:38.032317 1 round_trippers.go:580] Audit-Id: f34bf0ec-a85a-4e5d-afda-9c17381ec81d
I1120 16:30:38.032399 1 round_trippers.go:580] Cache-Control: no-cache, private
I1120 16:30:38.032482 1 round_trippers.go:580] Content-Type: text/plain; charset=utf-8
I1120 16:30:38.032565 1 round_trippers.go:580] X-Content-Type-Options: nosniff
I1120 16:30:38.032645 1 round_trippers.go:580] X-Kubernetes-Pf-Flowschema-Uid: 9a62d166-f78a-4e8e-aaa3-8d2067b77699
I1120 16:30:38.032728 1 round_trippers.go:580] X-Kubernetes-Pf-Prioritylevel-Uid: e89d9c7d-1c13-4179-b303-d928bb76a2fe
I1120 16:30:38.032804 1 round_trippers.go:580] Content-Length: 19
I1120 16:30:38.032947 1 request.go:1351] Response Body: 404 page not found |
I am stuck with a non-working
preflight
agent on my cluster. Before going further (i.e., using mitmproxy to see what is going on with the HTTP request being made toplaform.jetstack.io
), I wondered: is there a "debug" mode that would make the logs a bit more verbose?By verbose, I would probably expect to see some of the request being made: see the
200 OK
and so on. And maybe also some of the payload and the HTTP headers on the request and response.The agent does not seem to have any
--level
or-v
flag though:The text was updated successfully, but these errors were encountered: