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
Include searchable severity level in log lines #3101
Comments
@lackhoa: This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The 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. |
/assign |
@lackhoa The log in the controller begins with a character that represents the log level. grep for info:
grep for errors:
It think this works pretty well. |
@Skarlso Nice idea but unfortunately if you use stern, the log isn't at the beginning anymore.
|
The "problem" here is that we are using Further, it is still pretty much grep-able since I'll look into providing a header, but the header then won't match the log level, right? Logr is configured through numbers which represent chattyness. But at what point to switch to debug and what point to switch to trace or whatever? There is really no correlation other than an arbitrary one. These are the letter constant used by
With severity binding such as: infoLog severity = iota
warningLog
errorLog
fatalLog
numSeverity = 4 So I guess, I can bind these to the something. 🤔 Also this would, of course, mean that all of the controller and the whole project would have to adjust to use these log level headers. |
@Skarlso I didn't know stern was a defunct project, but my point wasn't about stern. It was about how grepping based on line opening can fail when you integrate with other things.
I guess everything is greppable if you put enough effort into it. I could also use awk to parse the log lines and then grep. But the point is that it should be easy, right? I personally would have no problem with numeric log levels, and it'd make things more transparent then why not. |
@lackhoa I get your point, and it's a valid one. We'll figure something out in the next community meeting as this affects the whole project ( so we would like to be consistent over other controllers as well ). Maybe something like |
Copying comment from #3152
|
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 |
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 |
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. /close |
@k8s-triage-robot: Closing this issue. In response to this:
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. |
/kind feature
Describe the solution you'd like
Currently logs produced by the capa controller does not include an obvious "grep"-able severity level, which makes it hard to search for errors or warnings, for example
I suggest including a severity level in the log lines, such as this...
... or this
The above are just some ideas; the exact format can be something else.
Anything else you would like to add:
Environment:
The text was updated successfully, but these errors were encountered: