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

Introduce Logger #369

Merged
merged 3 commits into from
Jun 21, 2016
Merged

Introduce Logger #369

merged 3 commits into from
Jun 21, 2016

Conversation

nicolai86
Copy link
Contributor

@nicolai86 nicolai86 commented Jun 20, 2016

Following #368 this PR introduces a Logger interface which allows us to extract the http2curl and logrus dependencies into the cli & command packages.

The Logger contains two functions - LogHTTP to handle http.Request, and Log for plain string.
The cli configures the ScalewayAPI instance to retain the old logging behaviour. By default, the logging is not very verbose, logging only messages & API endpoints being used.

Also, I've replaced anonuuid with static, fake uuids. Not sure why we need "randomized" uuids if the only concern is to sanitize logs from real credentials.

Log(...interface{})
}

func NewDefaultLogger() Logger {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exported function NewDefaultLogger should have comment or be unexported

@nicolai86
Copy link
Contributor Author

nicolai86 commented Jun 21, 2016

@QuentinPerez thanks for improving the PR! If you have other changes in mind let me know; also if you want to have the commits squashed or rebased, to conform commit msg guidelines.

@QuentinPerez
Copy link
Contributor

LGTM, ping @moul 😊

@moul
Copy link
Contributor

moul commented Jun 21, 2016

LGTM, thank you

@moul moul merged commit a8dd2cf into scaleway:master Jun 21, 2016
@moul
Copy link
Contributor

moul commented Jun 21, 2016

Well done guys

@moul
Copy link
Contributor

moul commented Jun 21, 2016

@QuentinPerez can you credit @nicolai86 in the changelog ?

@nicolai86
Copy link
Contributor Author

Thanks for being so responsive! I'll continue my quest to get scaleway into terraform, then. 🙏🏼

@nicolai86
Copy link
Contributor Author

nicolai86 commented Jun 25, 2016

For those interested in the progress of the terraform provider, you can take a look here: hashicorp/terraform#7331

clement-gilbert pushed a commit to clement-gilbert/scaleway-cli that referenced this pull request Mar 3, 2022
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.

4 participants