remove logging statements for another bikeshed

This commit is contained in:
Robert Muir 2015-04-23 21:18:56 -04:00
parent 5d2153fe9b
commit b2850bff47
2 changed files with 2 additions and 9 deletions

View File

@ -93,12 +93,8 @@ public class Bootstrap {
}
private void setupSecurity(Settings settings, Environment environment) throws Exception {
ESLogger logger = Loggers.getLogger(Bootstrap.class);
if (settings.getAsBoolean("security.enabled", true)) {
Security.configure(environment);
logger.info("security enabled");
} else {
logger.warn("security disabled");
}
}

View File

@ -19,6 +19,7 @@
package org.elasticsearch.bootstrap;
import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.StringHelper;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.env.Environment;
@ -53,11 +54,7 @@ class Security {
Path newConfig = processTemplate(environment.configFile().resolve("security.policy"), environment);
System.setProperty("java.security.policy", newConfig.toString());
System.setSecurityManager(new SecurityManager());
try {
Files.delete(newConfig);
} catch (Exception e) {
Loggers.getLogger(Security.class).warn("unable to remove temporary file: " + newConfig, e);
}
IOUtils.deleteFilesIgnoringExceptions(newConfig); // TODO: maybe log something if it fails?
}
// package-private for testing