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

Ensure logging is initialized in CLI tools #20575

Merged
merged 3 commits into from
Sep 20, 2016
Merged

Ensure logging is initialized in CLI tools #20575

merged 3 commits into from
Sep 20, 2016

Conversation

jasontedor
Copy link
Member

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.

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.
Copy link

@abeyad abeyad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaymode
Copy link
Member

jaymode commented Sep 20, 2016

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.
@jasontedor
Copy link
Member Author

jasontedor commented Sep 20, 2016

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.)

@jaymode
Copy link
Member

jaymode commented Sep 20, 2016

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
@jasontedor jasontedor merged commit 12234c0 into elastic:master Sep 20, 2016
@jasontedor jasontedor deleted the logging-configs branch September 20, 2016 12:28
jasontedor added a commit that referenced this pull request Sep 20, 2016
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
jasontedor added a commit that referenced this pull request Sep 20, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants