Leaking Private-Token in debug logs

How to prevent private tokens from leaking in debug logs?

It is too easy to share the log while looking for help.

2020-06-22T12:44:35.781+0300 [DEBUG] plugin.terraform-provider-gitlab: 2020/06/22 12:44:35 [DEBUG] GitLab API Request Details:
2020-06-22T12:44:35.781+0300 [DEBUG] plugin.terraform-provider-gitlab: ---[ REQUEST ]---------------------------------------
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: GET /api/v4/user HTTP/1.1
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: Host: gitlab.com
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: User-Agent: go-gitlab
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: Accept: application/json
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: Private-Token: **DON'T WANT TO SEE THIS**
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab: Accept-Encoding: gzip
2020-06-22T12:44:35.782+0300 [DEBUG] plugin.terraform-provider-gitlab:

Hi @abitrolly,

There’s currently no good way to do this. In theory, it could be done using a scrubbing tool, but that’s not the most satisfying answer. Issue #2 on the SDK is tracking this.