remove logging statements for another bikeshed
This commit is contained in:
parent
5d2153fe9b
commit
b2850bff47
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue