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

Optional logging in provider #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

coopersimon
Copy link

Description

This PR adds a new Provider interface method SetLog, which allows the library user to toggle logging inside the provider.

All log calls are now routed through provider.log which checks if logging is enabled before logging.

Logging is set to true by default to ensure that logging does not stop unexpectedly for existing users.

main.go has been tweaked to use this new method.

Testing

Tested in a proprietary app in which we needed logs, but did not need logging from go-get-proxied.

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

Successfully merging this pull request may close these issues.

1 participant