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

Debug: split log method into request and response logs #117

Open
kayrus opened this issue Mar 31, 2020 · 3 comments
Open

Debug: split log method into request and response logs #117

kayrus opened this issue Mar 31, 2020 · 3 comments

Comments

@kayrus
Copy link
Contributor

kayrus commented Mar 31, 2020

@jtopjian I propose the following interface for the debug client:

// Logger is an interface representing the Logger struct
type Logger interface {
        RequestPrintf(format string, args ...interface{})
        ResponsePrintf(format string, args ...interface{})
}

Do you have objections?

@jtopjian
Copy link
Contributor

What benefits would this provide?

@kayrus
Copy link
Contributor Author

kayrus commented Mar 31, 2020

You can use different log prefixes for a visual segregation of the request and response.

@jtopjian
Copy link
Contributor

I haven't come across an interface like this in other projects - my concern is that someone will need to implement a unique interface just to see the request/response information.

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

No branches or pull requests

2 participants