Move logging specific settings setup to log configurator.

This commit is contained in:
Ryan Ernst 2015-09-08 13:13:10 -07:00
parent e218b31322
commit f3fb702e88
2 changed files with 3 additions and 4 deletions

View File

@ -40,6 +40,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import static org.elasticsearch.common.Strings.cleanPath;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**
@ -110,6 +111,8 @@ public class LogConfigurator {
props.setProperty(key, value);
}
}
// ensure explicit path to logs dir exists
props.put("path.logs", cleanPath(environment.logsFile().toAbsolutePath().toString()));
PropertyConfigurator.configure(props);
}

View File

@ -21,7 +21,6 @@ package org.elasticsearch.node.internal;
import com.google.common.base.Charsets;
import com.google.common.collect.Sets;
import com.google.common.collect.UnmodifiableIterator;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.common.Booleans;
import org.elasticsearch.common.Strings;
@ -38,14 +37,11 @@ import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ThreadLocalRandom;
import static org.elasticsearch.common.Strings.cleanPath;
import static org.elasticsearch.common.settings.Settings.settingsBuilder;
/**