diff --git a/src/main/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrail.java b/src/main/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrail.java index 6aef9ec8713..10a32eb0d3e 100644 --- a/src/main/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrail.java +++ b/src/main/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrail.java @@ -268,7 +268,7 @@ public class LoggingAuditTrail implements AuditTrail { static String resolvePrefix(Settings settings) { StringBuilder builder = new StringBuilder(); - if (settings.getAsBoolean("shield.audit.logfile.prefix.node_host_address", false)) { + if (settings.getAsBoolean("shield.audit.logfile.prefix.emit_node_host_address", false)) { try { String address = InetAddress.getLocalHost().getHostAddress(); builder.append("[").append(address).append("] "); @@ -276,7 +276,7 @@ public class LoggingAuditTrail implements AuditTrail { // ignore } } - if (settings.getAsBoolean("shield.audit.logfile.prefix.node_host_name", false)) { + if (settings.getAsBoolean("shield.audit.logfile.prefix.emit_node_host_name", false)) { try { String hostName = InetAddress.getLocalHost().getHostName(); builder.append("[").append(hostName).append("] "); @@ -284,7 +284,7 @@ public class LoggingAuditTrail implements AuditTrail { // ignore } } - if (settings.getAsBoolean("shield.audit.logfile.prefix.node_name", true)) { + if (settings.getAsBoolean("shield.audit.logfile.prefix.emit_node_name", true)) { String name = settings.get("name"); if (name != null) { builder.append("[").append(name).append("] "); diff --git a/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java b/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java index be4d3bb1bbf..86fabb6c95c 100644 --- a/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java +++ b/src/test/java/org/elasticsearch/shield/audit/logfile/LoggingAuditTrailTests.java @@ -106,9 +106,9 @@ public class LoggingAuditTrailTests extends ElasticsearchTestCase { @Before public void init() throws Exception { settings = ImmutableSettings.builder() - .put("shield.audit.logfile.prefix.node_host_address", randomBoolean()) - .put("shield.audit.logfile.prefix.node_host_name", randomBoolean()) - .put("shield.audit.logfile.prefix.node_name", randomBoolean()) + .put("shield.audit.logfile.prefix.emit_node_host_address", randomBoolean()) + .put("shield.audit.logfile.prefix.emit_node_host_name", randomBoolean()) + .put("shield.audit.logfile.prefix.emit_node_name", randomBoolean()) .build(); prefix = LoggingAuditTrail.resolvePrefix(settings); }