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

Set the klog output to stdout by default #680

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

ingvagabund
Copy link
Contributor

Also, one needs to set --logtostderr=false to properly log into the stdout.

Fixes: #676

Testing locally while redirecting the stdout:

$ ./_output/bin/descheduler --kubeconfig ~/.kube/config --policy-config-file examples/policy.yaml --v=1 --descheduling-interval 10s --logtostderr=false 2>/dev/null
Flag --logtostderr has been deprecated, will be removed in a future release, see https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components
I1216 11:24:15.663767 2350329 secure_serving.go:200] Serving securely on [::]:10258
I1216 11:24:15.663856 2350329 tlsconfig.go:240] "Starting DynamicServingCertificateController"
I1216 11:24:17.294796 2350329 lownodeutilization.go:101] "Criteria for a node under utilization" CPU=20 Mem=20 Pods=20
I1216 11:24:17.294821 2350329 lownodeutilization.go:102] "Number of underutilized nodes" totalNumber=0
I1216 11:24:17.294832 2350329 lownodeutilization.go:115] "Criteria for a node above target utilization" CPU=50 Mem=50 Pods=50
I1216 11:24:17.294839 2350329 lownodeutilization.go:116] "Number of overutilized nodes" totalNumber=3
I1216 11:24:17.294848 2350329 lownodeutilization.go:119] "No node is underutilized, nothing to do here, you might tune your thresholds further"
I1216 11:24:17.294863 2350329 duplicates.go:110] "Processing node" node="ip-10-0-136-90.ec2.internal"
I1216 11:24:17.295034 2350329 duplicates.go:110] "Processing node" node="ip-10-0-139-62.ec2.internal"
I1216 11:24:17.295143 2350329 duplicates.go:110] "Processing node" node="ip-10-0-150-141.ec2.internal"
I1216 11:24:17.295288 2350329 duplicates.go:110] "Processing node" node="ip-10-0-151-50.ec2.internal"
I1216 11:24:17.295371 2350329 duplicates.go:110] "Processing node" node="ip-10-0-168-63.ec2.internal"
I1216 11:24:17.295446 2350329 duplicates.go:110] "Processing node" node="ip-10-0-174-145.ec2.internal"
I1216 11:24:17.295664 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-136-90.ec2.internal"
I1216 11:24:17.295787 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-139-62.ec2.internal"
I1216 11:24:17.295895 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-150-141.ec2.internal"
I1216 11:24:17.296016 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-151-50.ec2.internal"
I1216 11:24:17.296087 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-168-63.ec2.internal"
I1216 11:24:17.296152 2350329 toomanyrestarts.go:90] "Processing node" node="ip-10-0-174-145.ec2.internal"
I1216 11:24:17.296337 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-136-90.ec2.internal"
I1216 11:24:17.296610 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-139-62.ec2.internal"
I1216 11:24:17.296780 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-150-141.ec2.internal"
I1216 11:24:17.297087 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-151-50.ec2.internal"
I1216 11:24:17.297272 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-168-63.ec2.internal"
I1216 11:24:17.297460 2350329 pod_antiaffinity.go:92] "Processing node" node="ip-10-0-174-145.ec2.internal"
...

Also, one needs to set --logtostderr=false to properly log into the stdout
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 16, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund

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 the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 16, 2021
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2021
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit 96ff5d2 into kubernetes-sigs:master Dec 16, 2021
@ingvagabund ingvagabund deleted the klog-output-stdout branch December 16, 2021 13:42
briend pushed a commit to briend/descheduler that referenced this pull request Feb 11, 2022
…tdout

Set the klog output to stdout by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow logs to go to stdout
3 participants