-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: ensure consistent JSON log format for automaxprocs #6335
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great!
Could you please define this in a single place and just reference in each component? The best place is probably a new file in https://github.com/kedacore/keda/tree/main/pkg/util
fixed :) |
/run-e2e internal |
@omerap12 could you please also update Changelog? https://github.com/kedacore/keda/blob/main/CHANGELOG.md#improvements-1 |
Done |
err = kedautil.ConfigureMaxProcs(logger) | ||
if err != nil { | ||
logger.Error(err, "failed to set max procs") | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should this also have exit code 1 to be consistent with other components?
return | |
os.Exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that all the errors are simply returned, like: here. so I chose not to modify the existing error-handling behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, just wondering if it makes sense to unify the behavior
Lines 118 to 122 in 0a1d8be
err := kedautil.ConfigureMaxProcs(setupLog) | |
if err != nil { | |
setupLog.Error(err, "failed to set max procs") | |
os.Exit(1) | |
} |
Lines 82 to 86 in 0a1d8be
err := kedautil.ConfigureMaxProcs(setupLog) | |
if err != nil { | |
setupLog.Error(err, "failed to set max procs") | |
os.Exit(1) | |
} |
but it's just a cosmetic change, I'm ok with either path
Signed-off-by: Omer Aplatony <[email protected]>
Configures automaxprocs to use the application logger instead of default console logging to maintain consistent JSON format across all log output.
output:
keda-operator:
keda-operator-metrics-apiserver:
Checklist
Fixes #5970