OpenSearch/distribution
Jason Tedor 0519fa223c
Ensure logging is configured for CLI commands
Any CLI commands that depend on core Elasticsearch might touch classes
(directly or indirectly) that depends on logging. If they do this and
logging is not configured, Log4j will dump status error messages to the
console. As such, we need to ensure that any such CLI command configures
logging (with a trivial configuration that dumps log messages to the
console). Previously we did this in the base CLI command but with the
refactoring of this class out of core Elasticsearch, we no longer
configure logging there (since we did not want this class to depend on
settings and logging). However, this meant for some CLI commands (like
the plugin CLI) we were no longer configuring logging. This commit adds
base classes between the low-level command and multi-command classes
that ensure that logging is configured. Any CLI command that depends on
core Elasticsearch should use this infrastructure to ensure logging is
configured. There is one exception to this: Elasticsearch itself because
it takes reponsibility into its own hands for configuring logging from
Elasticsearch settings and log4j2.properties. We preserve this special
status.

Relates #27523
2017-11-25 11:40:08 -05:00
..
bwc Consolidate version numbering semantics (#27397) 2017-11-23 20:21:53 +00:00
deb Rename CONF_DIR to ES_PATH_CONF 2017-08-15 06:19:06 +09:00
integ-test-zip Revert shading for the low level rest client (#26367) 2017-08-25 14:13:12 -05:00
rpm Rename CONF_DIR to ES_PATH_CONF 2017-08-15 06:19:06 +09:00
src/main Logging: Unify log rotation for index/search slow log (#27298) 2017-11-15 10:01:32 +01:00
tar Tests: Change rest test extension from .yaml to .yml (#24659) 2017-05-16 17:24:35 -07:00
tools Ensure logging is configured for CLI commands 2017-11-25 11:40:08 -05:00
zip Tests: Change rest test extension from .yaml to .yml (#24659) 2017-05-16 17:24:35 -07:00
build.gradle Configure heap dump path out of the box 2017-09-22 14:22:03 -04:00