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
logging: enhanced log level setting interface #16021
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 for the submission. At a high level, this PR proposes to "enhance" the logging logic but I couldn't figure out what the enhancement is. I noticed a couple of log messages which are converted over to structured logging which is a nice cleanup, and there's a bunch of other churn which I honestly didn't follow.
What exactly is being enhanced here?
Couple of other minor comments to fix up below.
^ I should maybe add, the new code does seem a bit simpler at a glance. If that's the goal then I think I follow. If there's other bits I'm missing, please mention them since I wasn't able to pick them out from a brief glance through the PR ;) |
@joestringer This PR makes sense to me. The function logging.ConfigureLogLevel(false) // Use 'true' for debugging |
ae4c93b
to
4bdca22
Compare
@joestringer, yes indeed, apologies for the vague description 🙇! I reckon that as you and @rolinh highlighted it is pretty much about having a At first it emerged from a bug which I found regarding the non interpretation of the I have incorporated your couple suggestions and rebased 👍 |
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, LGTM.
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 like these changes, but I would like a better worded commit message.
Enhance the interface being used in order to configure the logging level
across the different components. This is an attempt to make it easier to understand
and use across the board compared to the current way of doing it.
Is quite vague. Please be more specific. Someting like:
Enhance the logging interface so that various levels of logrus logging can be used rather than just hard toggling between "info" and "debug"...
etc.
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.
LGTM pending Nate's suggestion
Enhance the logging interface so that various levels of logrus logging can be used rather than just hard toggling between "info" and "debug". Managing log `level` is now similarily done as the log `format`: - default is set with pkg/logging.DefaultLogLevel - getters and setters have been standardized and leveraged across other libraries too, eg: - SetLogLevel() - SetLogFormat() - GetLogLevel() - GetLogFormat() Signed-off-by: Maxime VISONNEAU <maxime.visonneau@gmail.com>
4bdca22
to
8727ec5
Compare
thanks for the review, I updated the commit details and rebased upon |
test-me-please |
test-me-please |
Hit flake #16159, marking as ready to merge. |
Enhance the logging interface so that various levels of logrus logging can be used rather than just hard toggling between "info" and "debug".
Managing log
level
is now similarily done as the logformat
:across other libraries too, eg:
Follow-up: #16002 & #16005