Skip to content

Commit

Permalink
Setting path.work does not affect the logs location, closes #366.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchy committed Sep 11, 2010
1 parent bc42352 commit ed5ffd6
Showing 1 changed file with 13 additions and 8 deletions.
Expand Up @@ -45,13 +45,6 @@ public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, b

Environment environment = new Environment(settingsBuilder.build());

// put back the env settings
settingsBuilder = settingsBuilder().put(pSettings);
settingsBuilder.put("path.home", cleanPath(environment.homeFile().getAbsolutePath()));
settingsBuilder.put("path.work", cleanPath(environment.workFile().getAbsolutePath()));
settingsBuilder.put("path.work_with_cluster", cleanPath(environment.workWithClusterFile().getAbsolutePath()));
settingsBuilder.put("path.logs", cleanPath(environment.logsFile().getAbsolutePath()));

if (loadConfigSettings) {
try {
settingsBuilder.loadFromUrl(environment.resolveConfig("elasticsearch.yml"));
Expand Down Expand Up @@ -99,6 +92,18 @@ public static Tuple<Settings, Environment> prepareSettings(Settings pSettings, b
settingsBuilder.put(ClusterName.SETTING, ClusterName.DEFAULT.value());
}

return new Tuple<Settings, Environment>(settingsBuilder.build(), environment);
Settings v1 = settingsBuilder.build();
environment = new Environment(v1);

// put back the env settings
settingsBuilder = settingsBuilder().put(v1);
settingsBuilder.put("path.home", cleanPath(environment.homeFile().getAbsolutePath()));
settingsBuilder.put("path.work", cleanPath(environment.workFile().getAbsolutePath()));
settingsBuilder.put("path.work_with_cluster", cleanPath(environment.workWithClusterFile().getAbsolutePath()));
settingsBuilder.put("path.logs", cleanPath(environment.logsFile().getAbsolutePath()));

v1 = settingsBuilder.build();

return new Tuple<Settings, Environment>(v1, environment);
}
}

0 comments on commit ed5ffd6

Please sign in to comment.