Skip to content

Introduce Logger#369

Merged
moul merged 3 commits intoscaleway:masterfrom
nicolai86:feature/introduce-logging-interface
Jun 21, 2016
Merged

Introduce Logger#369
moul merged 3 commits intoscaleway:masterfrom
nicolai86:feature/introduce-logging-interface

Conversation

@nicolai86
Copy link
Copy Markdown

@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.

Comment thread pkg/api/logger.go
Log(...interface{})
}

func NewDefaultLogger() Logger {
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

LGTM, ping @moul 😊

@moul
Copy link
Copy Markdown

moul commented Jun 21, 2016

LGTM, thank you

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

moul commented Jun 21, 2016

Well done guys

@moul
Copy link
Copy Markdown

moul commented Jun 21, 2016

@QuentinPerez can you credit @nicolai86 in the changelog ?

@nicolai86
Copy link
Copy Markdown
Author

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

@nicolai86
Copy link
Copy Markdown
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