Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make logger interface based with minimal methods #229

Closed
jeevatkm opened this issue Feb 27, 2019 · 2 comments
Closed

Make logger interface based with minimal methods #229

jeevatkm opened this issue Feb 27, 2019 · 2 comments
Assignees

Comments

@jeevatkm
Copy link
Member

jeevatkm commented Feb 27, 2019

The goal is to make the Resty logger interface based in v2 with minimal methods that Resty user could choose their choice of the logger.

Also if possible add default implementation using log.Logger compliant with the new interface.

@jeevatkm jeevatkm added this to the v2.0.0 Milestone milestone Feb 27, 2019
@jeevatkm jeevatkm added the v2 For resty v2 label Feb 27, 2019
@jeevatkm jeevatkm self-assigned this Mar 8, 2019
@jeevatkm jeevatkm changed the title Make logger with io.Writer based Make logger interface based with minimal methods Mar 12, 2019
@jeevatkm
Copy link
Member Author

Changes:

  • Client.SetLogger accepts resty.Logger interface
// Logger interface is to abstract the logging from Resty. Gives control to
// the Resty users, choice of the logger.
type Logger interface {
	Errorf(format string, v ...interface{})
	Warnf(format string, v ...interface{})
	Debugf(format string, v ...interface{})
}

jeevatkm added a commit that referenced this issue Mar 13, 2019
@jeevatkm
Copy link
Member Author

Its done 😄

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

No branches or pull requests

1 participant