hashicorp / go-retryablehttp

Retryable HTTP client in Go
Mozilla Public License 2.0
1.96k stars 247 forks source link

Update error log #177

Closed annawinkler closed 1 year ago

annawinkler commented 1 year ago

Change ERR to ERROR for consistency in our libraries.

To Do:

2022-12-23T18:19:35.431-0700 [INFO]  CLI command args: []string{"apply"}
2022/12/23 18:19:35 [DEBUG] GET https://app.terraform.io/.well-known/terraform.json

The DEBUG prints even if TF_LOG is set to info (which I did in this case). Also would be nice to have consistent date/time stamps.

ryanuber commented 1 year ago

Regarding the DEBUG logs above, I believe that could also be fixed by use of a leveled logger. Using a non-leveled logger as in the code change here leaves any level filtering to the caller. I think it'd be worth exploring that option to see if we can fix both cases by passing in a structured logger.

annawinkler commented 1 year ago

Thanks - I'll explore other options & close this PR.