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

Use an interface for logging #1279

Closed
aksdb opened this issue Mar 24, 2020 · 2 comments
Closed

Use an interface for logging #1279

aksdb opened this issue Mar 24, 2020 · 2 comments
Labels

Comments

@aksdb
Copy link

aksdb commented Mar 24, 2020

Currently internal.Logger is defined as being *log.Logger; a pointer to a struct. This makes it impossible to use a custom logger. We either have to live with the stdlib logger or disable logging (or implement some awful hacks involving the writer).

All that is used throughout the library however is Printf(...). Therefore I propose to instead define a slim interface with only the method required and use that. The stdlib logger can still be the default, but at least it's possible then to easily replace it with a truly custom implementation.

@KevinAnthony
Copy link

I like this as a first step, but it would be nice if it implemented at the very least err/info.

Copy link

This issue is marked stale. It will be closed in 30 days if it is not updated.

@github-actions github-actions bot added the Stale label Dec 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants