Skip to content

Conversation

masahiro331
Copy link

@masahiro331 masahiro331 commented Apr 27, 2021

Hi maintainers.

Thank you for great library.
I'd like to handling error log across versions.

e.g.

type logger struct{}

func (logger) Error(msg string, values ...interface{}) {
	// I don't want this implementation
	// if msg == "request failed" {
	// }
	
	// I want to implement this.
	if msg == RequestFailedMsg {
		// doSomething()
	}
	log.Logger.Errorw(msg, values)
}

func main() {
	retryClient := retryablehttp.NewClient()
	retryClient.Logger = logger{}
}

I like this library, Thank you.

@hashicorp-cla
Copy link

hashicorp-cla commented Apr 27, 2021

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants