Plugins: Ensure logging configuration is loaded in plugin manager
This prevents log4j warnings printed out, when installing a plugin due to the JarHell class using an ESLogger. Closes #12064
This commit is contained in:
parent
5e023848de
commit
21b4f9b6f8
|
@ -31,6 +31,7 @@ import org.elasticsearch.common.cli.Terminal;
|
|||
import org.elasticsearch.common.collect.Tuple;
|
||||
import org.elasticsearch.common.http.client.HttpDownloadHelper;
|
||||
import org.elasticsearch.common.io.FileSystemUtils;
|
||||
import org.elasticsearch.common.logging.log4j.LogConfigurator;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.env.Environment;
|
||||
|
@ -408,6 +409,7 @@ public class PluginManager {
|
|||
|
||||
public static void main(String[] args) {
|
||||
Tuple<Settings, Environment> initialSettings = InternalSettingsPreparer.prepareSettings(EMPTY_SETTINGS, true, Terminal.DEFAULT);
|
||||
LogConfigurator.configure(initialSettings.v1());
|
||||
|
||||
try {
|
||||
Files.createDirectories(initialSettings.v2().pluginsFile());
|
||||
|
|
Loading…
Reference in New Issue