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

logcheck doesn't handle Exit* functions correctly #264

Closed
serathius opened this issue Sep 15, 2021 · 5 comments · Fixed by #265
Closed

logcheck doesn't handle Exit* functions correctly #264

serathius opened this issue Sep 15, 2021 · 5 comments · Fixed by #265
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.

Comments

@serathius
Copy link

serathius commented Sep 15, 2021

/kind bug

klog defines set of functions Exit, Exitf, Exitln, ExitDepth. Those functions are not correctly handled by logcheck. kubernetes/kubernetes#103293 (comment)

What steps did you take and what happened:

When running logcheck to validate log calls, it reported Exitf as structured logging method

/home/prow/go/src/k8s.io/kubernetes/test/images/apparmor-loader/loader.go:64:3: structured logging function "Exitf" should not use format specifier "%s"

What did you expect to happen:

I would expect that logcheck will ignore this method when in allow-unstructured mode and report it as error only when allow-unstructured is off.

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

@serathius
Copy link
Author

/wg structured-logging
/cc @kubernetes/wg-structured-logging-members
/milestone v1.23

@k8s-ci-robot k8s-ci-robot added the wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging. label Sep 15, 2021
@luyou86
Copy link

luyou86 commented Sep 15, 2021

could assign it to me?

@serathius
Copy link
Author

Done

@serathius
Copy link
Author

Please let me know if you need any help (and nag me if I don't respond, best to reach me via a K8s Slack)

@luyou86
Copy link

luyou86 commented Sep 15, 2021

ok, thx

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. wg/structured-logging Categorizes an issue or PR as relevant to WG Structured Logging.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants