Open medains opened 3 years ago
This line sets up a new logger.
https://github.com/hashicorp/go-retryablehttp/blob/02c1586c8f14be23e7eeb522f1094afbabf45e93/client.go#L53
Using log.Default() would have the same base behaviour.
A user who changes the behaviour of the default logger will not affect the default logger in go-retryablehttp. An example of this is that the terraform http-backend logs http requests with this line: https://github.com/hashicorp/go-retryablehttp/blob/02c1586c8f14be23e7eeb522f1094afbabf45e93/client.go#L551 these log lines are unaffected by the terraform logging environment variables.
log.Default() returns a pointer to the default logger, not a new logger with defaults?
log.Default()
This line sets up a new logger.
https://github.com/hashicorp/go-retryablehttp/blob/02c1586c8f14be23e7eeb522f1094afbabf45e93/client.go#L53
Using log.Default() would have the same base behaviour.
A user who changes the behaviour of the default logger will not affect the default logger in go-retryablehttp. An example of this is that the terraform http-backend logs http requests with this line: https://github.com/hashicorp/go-retryablehttp/blob/02c1586c8f14be23e7eeb522f1094afbabf45e93/client.go#L551 these log lines are unaffected by the terraform logging environment variables.