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:
Alexander Reelsen 2015-07-07 13:01:24 +02:00
parent 5e023848de
commit 21b4f9b6f8
1 changed files with 2 additions and 0 deletions

View File

@ -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());