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

[clusterctl] log to stdout by default #712

Closed
wants to merge 1 commit into from

Conversation

chuckha
Copy link
Contributor

@chuckha chuckha commented Jan 25, 2019

Signed-off-by: Chuck Ha [email protected]

What this PR does / why we need it:
This PR sets klog to log to stdout by default and removes the entirety of the logutil.go file.

It also fixes the build since rules_go updated for go 1.11.5.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #711

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

NONE

/cc @vincepri

@k8s-ci-robot k8s-ci-robot requested a review from vincepri January 25, 2019 22:18
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chuckha
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: justinsb

If they are not already assigned, you can assign the PR to them by writing /assign @justinsb in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 25, 2019
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.5/rules_go-0.16.5.tar.gz",
sha256 = "7be7dc01f1e0afdba6c8eb2b43d2fa01c743be1b9273ab1eaf6c233df078d705",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.16.6/rules_go-0.16.6.tar.gz",
sha256 = "ade51a315fa17347e5c31201fdc55aa5ffb913377aa315dceb56ee9725e620ee",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous version of rules_go did not know about go 1.11.5 so make gazelle failed with "unknown go version 1.11.5"

RootCmd.PersistentFlags().AddGoFlagSet(flag.CommandLine)
InitLogs()
Copy link
Contributor

Choose a reason for hiding this comment

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

InitLogs() no longer has callers. Is there a reason you did not change InitLogs() directly?

@@ -50,6 +50,6 @@ func exitWithHelp(cmd *cobra.Command, err string) {

func init() {
klog.InitFlags(flag.CommandLine)
klog.SetOutput(os.Stdout)
Copy link
Member

Choose a reason for hiding this comment

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

Why not stderr?

@chuckha
Copy link
Contributor Author

chuckha commented Jan 25, 2019

@davidewatson @vincepri I don't think this is the right approach anymore. Deleting the logutils file seemed like a good idea at the time, but it turns out it was not. I'll need to dig deeper into this on Monday (unless someone gets to it first).

@chuckha chuckha closed this Jan 25, 2019
@chuckha chuckha deleted the stdout-logging branch January 25, 2019 23:05
@k8s-ci-robot
Copy link
Contributor

@chuckha: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-cluster-api-test f78a71f link /test pull-cluster-api-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

jayunit100 pushed a commit to jayunit100/cluster-api that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clusterctl no longer logs to stdout by default
4 participants