-
Notifications
You must be signed in to change notification settings - Fork 218
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
stderrthreshold not honored when logtostderr is set #212
Comments
@DirectXMan12 @justinsb @neolit123 @mtaufen could you please take a look? |
@pohly @yuzhiquan @munnerz could you please take a look? |
Who needs to be tagged to get feedback? @jayunit100 |
Everyone is extremely overloaded. This looks like it may be much more important to you than perhaps to some other people. The description of the reversion PR is pretty clear about what went wrong. I recommend sending a PR that adds what you need while not triggering the problems mentioned there. |
@lavalamp I can understand that you are all loaded with work but this seems a pretty big bug for a logging library and it seems incredible to me that in two years no one has been able to fix it. |
@pierluigilenoci please re-read exactly what @lavalamp said. that's what you will hear from any one of us. good luck! |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/remove-lifecycle stale |
@lavalamp @dims any chance to get the PR of @pierluigilenoci approved? Sorry for jumping in, but I am affected by a pod for Azure AKS which is using this library and generating high log storage costs per month ... |
@deyanp this is configurable from the command line as well as programatically, so sorry i don't see why the application developer using this library is unable to set this in one of those ways? can you please explain more? |
@dims , I cannot explain more, as I am not a contributor to the client library/application in question (using klog) - https://github.com/Azure/secrets-store-csi-driver-provider-azure ... My understanding is that the contributors of (e.g. @aramase ) are stating the bug is in klog ... |
I came across this same issue today when using the cluster-autoscaler. I concur with what others have stated here about the fact that stderrthreshold was not honored when logtostderr was set to true. However, it is honored when logtostderr is set to false. In addition, if you want to log to stderr then you can set logtostderr to false and then set stderrthreshold to a value that is less than ERROR (ex: INFO) and the logs will show up in stderr.
The code that is responsible for this logic can be found at https://github.com/kubernetes/klog/blob/main/klog.go#L938 This may not fulfill all use cases for individuals who have posted here, but I hope others find this information helpful. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
That's the key takeaway: you want a new mode of operation, one which currently isn't supported. That's fair. But as with any other feature request the question then becomes whether that feature is useful enough to enough users to justify extra complexity or (if that turns out to be necessary) breaking other users. The bar for the latter is very high. |
Can one add an option in addition to the existing ones, which provides the expected functionality, while deprecating the current way of doing it? Keep the flags independent of each other, logtostderr, logtofiles, stderrthreshold, logtofilesthreshold. |
A new Just to be crystal clear: the goal is to write only errors and warnings to stderr and completely suppress all info log entries? |
I'm not sure about deprecation. It implies that users must take action and that we then eventually really will change the code. I for one don't have the motivation for that and dealing with upset users. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
This is still an issue |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
/lifecycle frozen |
/remove-lifecycle frozen |
@tallclair this is still a huge bug that nobody want to face 😉 |
/lifecycle frozen @pierluigilenoci lifecycle frozen prevents the bug from being auto-closed. It doesn't mean we're stopping work on it. It's an acknowledgement that this is a real bug that should be fixed and not ignored... |
@pierluigilenoci has already started working on this and - as far as I know - intends to finish that work. I'm not aware of others who care enough about it to address this issue. |
Also note that I clarified the current behavior in #319, so there should be no misunderstanding anymore about what the current implementation does. |
/kind feature It works as originally implemented and (now) as documented, it just doesn't do something that would be useful to some users (filter by severity when writing to stderr). |
/remove-kind bug |
This is important to me as well. I think that it should be important to many other people. FWIW, it seems that the aws-ebs-csi-driver uses klog, which reports all messages as errors. (This is only one example.) Props to those of you supporting this project; I know it's a largely thankless effort. :) |
Can you explain further? If the driver uses e.g. |
This bug has been documented and has become a feature. 😉 I had started implementing a solution in the past, but I stopped when I realized that it was only possible to do so (based on my skills and knowledge) by introducing breaking changes. And so I got stuck. 😞 I hope one day to find the time to try again, but I can't promise that. 🙏🏻 |
/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
We're using the
klog
logging framework in Secrets Store CSI Driver. When trying to set-stderrthreshold=ERROR
with-logtostderr=true
, we're seeing all the logs are being printed. Is this the expected behavior?Users want to only log the
ERROR
but that doesn't seem like an option today? Is there any configuration that we're missing.cc @tam7t
What did you expect to happen:
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The text was updated successfully, but these errors were encountered: