OpenSearch/test
Jason Tedor fbe27664a6 Fix prefix logging
Today we add a prefix when logging within Elasticsearch. This prefix
contains the node name, and index and shard-level components if
appropriate.

Due to some implementation details with Log4j 2 , this does not work for
integration tests; instead what we see is the node name for the last
node to startup. The implementation detail here is that Log4j 2 there is
only one logger for a name, message factory pair, and the key derived
from the message factory is the class name of the message factory. So,
when the last node starts up and starts setting prefixes on its message
factories, it will impact the loggers for the other nodes.

Additionally, the prefixes are lost when logging an exception. This is
due to another implementation detail in Log4j 2. Namely, since we log
exceptions using a parameterized message, Log4j 2 decides that that
means that we do not want to use the message factory that we have
provided (the prefix message factory) and so logs the exception without
the prefix.

This commit fixes both of these issues.

Relates #20429
2016-09-13 14:46:34 -04:00
..
fixtures in the plugin: guard against HADOOP_HOME in environment on any platform. 2015-12-21 02:21:53 -05:00
framework Fix prefix logging 2016-09-13 14:46:34 -04:00
logger-usage Add empty test to ESLoggerUsageTests 2016-08-31 04:41:07 -04:00
build.gradle Add authentication to reindex-from-remote 2016-07-27 14:17:41 -04:00