hamilton icon indicating copy to clipboard operation
hamilton copied to clipboard

DEBUG log entry showing up in production.

Open williamohara opened this issue 1 year ago • 1 comments

https://github.com/manicminer/hamilton/blob/d185bae4531b33a82a48259ee1575bb50774d502/msgraph/serviceprincipals.go#L107

I am using hamilton in my project to work with msGraph, specifically to create and manage service principals and groups in azure. I am calling this function in my code to retrieve a service principal. it is producing a debug log entry that looks like this ...

2023/05/17 23:53:24 [DEBUG] POST https://login.microsoftonline.com/e2752eb2-38c3-4793-bf6c-b73751ee06ee/oauth2/v2.0/token

my logs look like this now... image

The log entry is beautifully formatted but as you can see it is somewhat incongruent. I tried to trace through the code to see where it may happen but could not see it with my layman eyes.

williamohara avatar May 18 '23 00:05 williamohara

Related to https://github.com/chainguard-dev/go-apk/pull/124 or https://github.com/hashicorp/go-azure-sdk/blob/main/sdk/client/client.go#L691

How can we configure the retryablehttp client to use specific logger ? https://github.com/hashicorp/go-azure-sdk/blob/90a9a0b31d94dacce39ace8035751a37a8a92e85/sdk/auth/client.go#L66

k3v3n avatar Jun 26 '24 00:06 k3v3n