-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Complete Elasticsearch logger names #20457
Complete Elasticsearch logger names #20457
Conversation
This commit modifies the logger names within Elasticsearch to be the fully-qualified class name as opposed removing the org.elasticsearch prefix and dropping the class name. This change separates the root logger from the Elasticsearch loggers (they were equated from the removal of the org.elasticsearch prefix) and enables log levels to be set at the class level (instead of the package level).
retest this please |
LGTM |
retest this please |
This pull request unearthed an issue that exists in master today regarding the hierarchy of setting logger levels. I opened #20463. |
Today when associating a logger with a Lucene info stream component, we equate all components with lucene.iw except for IFD which we associate with lucene.ifd. This commit modifies this so that these logger names are now derived from the component name in all cases (we simply append the component name to the parent logger name, with a dot prefix).
@jasontedor the Lucene logger name commit LGTM |
Thank you @abeyad. |
This commit modifies the logger names within Elasticsearch to be the fully-qualified class name as opposed removing the org.elasticsearch prefix and dropping the class name. This change separates the root logger from the Elasticsearch loggers (they were equated from the removal of the org.elasticsearch prefix) and enables log levels to be set at the class level (instead of the package level). Relates #20457
This commit modifies the logger names within Elasticsearch to be the fully-qualified class name as opposed removing the org.elasticsearch prefix and dropping the class name. This change separates the root logger from the Elasticsearch loggers (they were equated from the removal of the org.elasticsearch prefix) and enables log levels to be set at the class level (instead of the package level). Relates #20457
} else { | ||
return logger; | ||
} | ||
return Loggers.getLogger(parentLogger, "." + component); |
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 think this change inadvertently slowed down indexing: see annot AZ at https://benchmarks-old.elastic.co/index.html#indexing
The problem is (confusingly!) this private method is called for every log message that Lucene's IndexWriter
makes. Previously, we invoked Loggers.getLogger
just twice on creating LoggerInfoStream
but now we are calling it for every log message.
This commit modifies the logger names within Elasticsearch to be the
fully-qualified class name as opposed removing the org.elasticsearch
prefix and dropping the class name. This change separates the root
logger from the Elasticsearch loggers (they were equated from the
removal of the org.elasticsearch prefix) and enables log levels to be
set at the class level (instead of the package level).
Closes #20326