-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Remove log4j dependency from elasticsearch-core #28705
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
Conversation
This removes the log4j dependency from our elasticsearch-core project. It was originally necessary only for our jar classpath checking. It is now replaced by a `Consumer<String>` so that the es-core dependency doesn't have external dependencies. The parts of elastic#28191 which were moved in conjunction (like `ESLoggerFactory` and `Loggers`) have been moved back where appropriate, since they are not required in the core jar. This is tangentially related to elastic#28504
I also tested locally that this doesn't break the output from the gradle task that invokes the
And an error still causes output:
|
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.
Minor request.
System.out.println("no jar hell found"); | ||
} | ||
|
||
/** | ||
* Checks the current classpath for duplicate classes | ||
* @throws IllegalStateException if jar hell was found | ||
*/ | ||
public static void checkJarHell() throws IOException, URISyntaxException { | ||
public static void checkJarHell(Consumer<String> output) throws IOException, URISyntaxException { |
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.
Can you update the Javadoc to explain this parameter?
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.
Certainly, I've pushed a commit that does this
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.
A few more minors, no need for another round.
@@ -152,31 +149,32 @@ public static void checkJarHell() throws IOException, URISyntaxException { | |||
|
|||
/** | |||
* Checks the set of URLs for duplicate classes | |||
* @param urls A set of URLs from the classpath to be checked for conflicting jars | |||
* @param output A {@code String} {@link Consumer} to which debug output will be sent |
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 guess String
should be @link
too?
System.out.println("no jar hell found"); | ||
} | ||
|
||
/** | ||
* Checks the current classpath for duplicate classes | ||
* @param output A {@code String} {@link Consumer} to which debug output will be sent |
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.
@link
?
} | ||
output.accept("java.class.path: " + System.getProperty("java.class.path")); | ||
output.accept("sun.boot.class.path: " + System.getProperty("sun.boot.class.path")); | ||
if (loader instanceof URLClassLoader ) { |
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, and I know it was there, but there's an extra space between URLClassLoader
and )
.
* Remove log4j dependency from elasticsearch-core This removes the log4j dependency from our elasticsearch-core project. It was originally necessary only for our jar classpath checking. It is now replaced by a `Consumer<String>` so that the es-core dependency doesn't have external dependencies. The parts of #28191 which were moved in conjunction (like `ESLoggerFactory` and `Loggers`) have been moved back where appropriate, since they are not required in the core jar. This is tangentially related to #28504 * Add javadocs for `output` parameter * Change @code to @link
* Remove log4j dependency from elasticsearch-core This removes the log4j dependency from our elasticsearch-core project. It was originally necessary only for our jar classpath checking. It is now replaced by a `Consumer<String>` so that the es-core dependency doesn't have external dependencies. The parts of elastic#28191 which were moved in conjunction (like `ESLoggerFactory` and `Loggers`) have been moved back where appropriate, since they are not required in the core jar. This is tangentially related to elastic#28504 * Add javadocs for `output` parameter * Change @code to @link
* [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase
* [DOCS] Combo version of ILM docs. * [DOCS] Moved tutorial from Kibana. * Adds documentation for index lifecycle policies (#28705) * [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase * Adds X-Pack icon for ILM (#34178) * Add ILM tutorial (#59502) * Add tutorial for ILM with filebeat * Change screenshots and add additional steps * Update screenshots, add numbered steps, and other minor edits * Incorporate feedback: update links, formatting, and minor edits * Move tip inline with list * Apply suggestions from code review Co-Authored-By: James Rodewig <[email protected]> * Move TIP inline . . . again * Put TIP inline Co-authored-by: James Rodewig <[email protected]> * Updates for navigation redesign (#68709) * [DOCS] Updates for navigation redesign * Getting started * Set up text * Discover * Dashboard, Graph, ML, Maps, APM, SIEM, Dev tools * Dev Tools, Stack Monitoring, Management * Management * Final changes * [DOCS] Updates for navigation redesign * [DOCS] Updates CCR monitoring screenshots * updates SIEM screenshot and Cases overview text * Added Brandon's APM image * [DOCS] Refines CCR shard screenshot * Removed merge conflict image file Co-authored-by: lcawl <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Put API examples in collapsible sections like ML does * Fix include * Added tutorial images * Fixed images * Add short title for FB tutorial * Add missing files * Incorporate review feedback * review feedback * Incorporated review feedback Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]>
* [DOCS] Combo version of ILM docs. * [DOCS] Moved tutorial from Kibana. * Adds documentation for index lifecycle policies (elastic#28705) * [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase * Adds X-Pack icon for ILM (elastic#34178) * Add ILM tutorial (elastic#59502) * Add tutorial for ILM with filebeat * Change screenshots and add additional steps * Update screenshots, add numbered steps, and other minor edits * Incorporate feedback: update links, formatting, and minor edits * Move tip inline with list * Apply suggestions from code review Co-Authored-By: James Rodewig <[email protected]> * Move TIP inline . . . again * Put TIP inline Co-authored-by: James Rodewig <[email protected]> * Updates for navigation redesign (elastic#68709) * [DOCS] Updates for navigation redesign * Getting started * Set up text * Discover * Dashboard, Graph, ML, Maps, APM, SIEM, Dev tools * Dev Tools, Stack Monitoring, Management * Management * Final changes * [DOCS] Updates for navigation redesign * [DOCS] Updates CCR monitoring screenshots * updates SIEM screenshot and Cases overview text * Added Brandon's APM image * [DOCS] Refines CCR shard screenshot * Removed merge conflict image file Co-authored-by: lcawl <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Put API examples in collapsible sections like ML does * Fix include * Added tutorial images * Fixed images * Add short title for FB tutorial * Add missing files * Incorporate review feedback * review feedback * Incorporated review feedback Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]>
* [DOCS] Combo version of ILM docs. * [DOCS] Moved tutorial from Kibana. * Adds documentation for index lifecycle policies (#28705) * [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase * Adds X-Pack icon for ILM (#34178) * Add ILM tutorial (#59502) * Add tutorial for ILM with filebeat * Change screenshots and add additional steps * Update screenshots, add numbered steps, and other minor edits * Incorporate feedback: update links, formatting, and minor edits * Move tip inline with list * Apply suggestions from code review Co-Authored-By: James Rodewig <[email protected]> * Move TIP inline . . . again * Put TIP inline Co-authored-by: James Rodewig <[email protected]> * Updates for navigation redesign (#68709) * [DOCS] Updates for navigation redesign * Getting started * Set up text * Discover * Dashboard, Graph, ML, Maps, APM, SIEM, Dev tools * Dev Tools, Stack Monitoring, Management * Management * Final changes * [DOCS] Updates for navigation redesign * [DOCS] Updates CCR monitoring screenshots * updates SIEM screenshot and Cases overview text * Added Brandon's APM image * [DOCS] Refines CCR shard screenshot * Removed merge conflict image file Co-authored-by: lcawl <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Put API examples in collapsible sections like ML does * Fix include * Added tutorial images * Fixed images * Add short title for FB tutorial * Add missing files * Incorporate review feedback * review feedback * Incorporated review feedback Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]> Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]>
* [DOCS] Combo version of ILM docs. * [DOCS] Moved tutorial from Kibana. * Adds documentation for index lifecycle policies (elastic#28705) * [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase * Adds X-Pack icon for ILM (elastic#34178) * Add ILM tutorial (elastic#59502) * Add tutorial for ILM with filebeat * Change screenshots and add additional steps * Update screenshots, add numbered steps, and other minor edits * Incorporate feedback: update links, formatting, and minor edits * Move tip inline with list * Apply suggestions from code review Co-Authored-By: James Rodewig <[email protected]> * Move TIP inline . . . again * Put TIP inline Co-authored-by: James Rodewig <[email protected]> * Updates for navigation redesign (elastic#68709) * [DOCS] Updates for navigation redesign * Getting started * Set up text * Discover * Dashboard, Graph, ML, Maps, APM, SIEM, Dev tools * Dev Tools, Stack Monitoring, Management * Management * Final changes * [DOCS] Updates for navigation redesign * [DOCS] Updates CCR monitoring screenshots * updates SIEM screenshot and Cases overview text * Added Brandon's APM image * [DOCS] Refines CCR shard screenshot * Removed merge conflict image file Co-authored-by: lcawl <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Put API examples in collapsible sections like ML does * Fix include * Added tutorial images * Fixed images * Add short title for FB tutorial * Add missing files * Incorporate review feedback * review feedback * Incorporated review feedback Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]> Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]>
* [DOCS] Combo version of ILM docs. (#57909) (#59029) * [DOCS] Combo version of ILM docs. * [DOCS] Moved tutorial from Kibana. * Adds documentation for index lifecycle policies (#28705) * [DOCS] Adds documentation for index lifecycle policies * [DOCS] Updated image for policy options to show all menu items * Update create-policy.asciidoc * [DOCS] Incorporated review comments on hot and warm phase * [DOCS] Additional changes to warm phase * [DOCS] Removed the word open in the warm phase * Adds X-Pack icon for ILM (#34178) * Add ILM tutorial (#59502) * Add tutorial for ILM with filebeat * Change screenshots and add additional steps * Update screenshots, add numbered steps, and other minor edits * Incorporate feedback: update links, formatting, and minor edits * Move tip inline with list * Apply suggestions from code review Co-Authored-By: James Rodewig <[email protected]> * Move TIP inline . . . again * Put TIP inline Co-authored-by: James Rodewig <[email protected]> * Updates for navigation redesign (#68709) * [DOCS] Updates for navigation redesign * Getting started * Set up text * Discover * Dashboard, Graph, ML, Maps, APM, SIEM, Dev tools * Dev Tools, Stack Monitoring, Management * Management * Final changes * [DOCS] Updates for navigation redesign * [DOCS] Updates CCR monitoring screenshots * updates SIEM screenshot and Cases overview text * Added Brandon's APM image * [DOCS] Refines CCR shard screenshot * Removed merge conflict image file Co-authored-by: lcawl <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Put API examples in collapsible sections like ML does * Fix include * Added tutorial images * Fixed images * Add short title for FB tutorial * Add missing files * Incorporate review feedback * review feedback * Incorporated review feedback Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]> Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]> * [DOCS] Remove datastream reference Co-authored-by: gchaps <[email protected]> Co-authored-by: Lisa Cawley <[email protected]> Co-authored-by: Melori Arellano <[email protected]> Co-authored-by: James Rodewig <[email protected]> Co-authored-by: Kaarina Tungseth <[email protected]> Co-authored-by: Ben Skelker <[email protected]>
This removes the log4j dependency from our elasticsearch-core project. It was
originally necessary only for our jar classpath checking. It is now replaced by
a
Consumer<String>
so that the es-core dependency doesn't have externaldependencies.
The parts of #28191 which were moved in conjunction (like
ESLoggerFactory
andLoggers
) have been moved back where appropriate, since they are not requiredin the core jar.
This is tangentially related to #28504