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

Debug logs being written to stderr #320

Closed
marty2bell opened this issue Sep 18, 2020 · 6 comments
Closed

Debug logs being written to stderr #320

marty2bell opened this issue Sep 18, 2020 · 6 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Milestone

Comments

@marty2bell
Copy link

What steps did you take and what happened:
[A clear and concise description of what the bug is.]

These logs from the secret store image seem to be written to sdterr which causes alerts in our monitoring solution.

time="2020-09-16T19:30:12Z" level=debug msg="GRPC request: "
time="2020-09-16T19:30:12Z" level=debug msg="GRPC response: ready:<value:true > "
time="2020-09-16T19:30:14Z" level=debug msg="GRPC call: /csi.v1.Node/NodeGetCapabilities"

What did you expect to happen:

Write debug logs to sdtout.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Also, is there a mechanism to turn off debug logs, tune the logging level to info for example?

Which provider are you using:
[e.g. Azure Key Vault, HashiCorp Vault, etc. Have you checked out the provider's repo for more help?]

We are using this driver on AKS with Azure Key Vault

Environment:

  • Secrets Store CSI Driver version: (use the image tag): 0.0.12
  • Kubernetes version: (use kubectl version): 1.18.6
@marty2bell marty2bell added the kind/bug Categorizes issue or PR as related to a bug. label Sep 18, 2020
@aramase
Copy link
Member

aramase commented Sep 21, 2020

logrus by default writes all logs to stderr and there is no inherent way to configure it - sirupsen/logrus#403. We might need to add the hooks to reconfigure this behavior.

@marty2bell You can disable debug logs by setting --debug=false for the secrets-store container - https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/master/charts/secrets-store-csi-driver/values.yaml#L101-L102

@marty2bell
Copy link
Author

@aramase Thanks for the tip on disabling debug

@marty2bell
Copy link
Author

Hey @aramase Any thoughts on how to address this as it's causing quite a bit of noise in our production environment?

Doesn't look like logrus is going to change for new features......

@aramase aramase added this to To do in Roadmap Oct 6, 2020
@aramase
Copy link
Member

aramase commented Oct 6, 2020

@marty2bell I think the right way to fix the problem is to switch to use klog for logging. I'll add this as part of the v0.0.16 milestone.

@aramase aramase added this to the v0.0.16 milestone Oct 6, 2020
@aramase
Copy link
Member

aramase commented Nov 5, 2020

/close

(With switch to klog. klog writes logs to stderr too. Changing the io.Writer for each log level results in duplication of logs)

@k8s-ci-robot
Copy link
Contributor

@aramase: Closing this issue.

In response to this:

/close

(With switch to klog. klog writes logs to stderr too. Changing the io.Writer for each log level results in duplication of logs)

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.

@aramase aramase moved this from To do to Done in Roadmap Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
Development

No branches or pull requests

3 participants