-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Ensure logging is initialized in CLI tools #20575
Conversation
Today when CLI tools are executed, logging statements can intentionally or unintentionally be executed when logging is not configured. This leads to log messages that the status logger is not configured. This commit reworks logging configuration for CLI tools so that logging is always configured.
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
LGTM as well. Thanks @jasontedor for tracking this down |
This commit removes the ability to configure individual loggers in CLI tools; this is a feature that is probably not needed as setting the root logger level should be sufficient here.
Thanks for looking @abeyad and @jaymode. On second thought I decided to remove the ability to configure individual loggers for CLI tools, it's the root logger or nothing. I pushed 72d2e06; can you please take a look? (Note that that feature was never there before, I just added it in the first version of this PR.) |
Still LGTM |
This commit cleans up LogConfigurator: - removes unnecessary newlines in a method defintion - moves a comment to clarify its intent - adds a null check on two method parameters
Today when CLI tools are executed, logging statements can intentionally or unintentionally be executed when logging is not configured. This leads to log messages that the status logger is not configured. This commit reworks logging configuration for CLI tools so that logging is always configured. Relates #20575
Today when CLI tools are executed, logging statements can intentionally or unintentionally be executed when logging is not configured. This leads to log messages that the status logger is not configured. This commit reworks logging configuration for CLI tools so that logging is always configured. Relates #20575
Today when CLI tools are executed, logging statements can intentionally
or unintentionally be executed when logging is not configured. This
leads to log messages that the status logger is not configured. This
commit reworks logging configuration for CLI tools so that logging is
always configured.