diff --git a/server/src/main/java/org/elasticsearch/index/IndexingSlowLog.java b/server/src/main/java/org/elasticsearch/index/IndexingSlowLog.java index 2d7185eeb7c25..7d802ebfc62ca 100644 --- a/server/src/main/java/org/elasticsearch/index/IndexingSlowLog.java +++ b/server/src/main/java/org/elasticsearch/index/IndexingSlowLog.java @@ -179,47 +179,19 @@ public void postIndex(ShardId shardId, Engine.Index indexOperation, Engine.Index final long tookInNanos = result.getTook(); if (indexWarnThreshold >= 0 && tookInNanos > indexWarnThreshold) { indexLogger.warn( - IndexingSlowLogMessage.of( - this.slowLogFields.indexFields(), - index, - doc, - tookInNanos, - reformat, - maxSourceCharsToLog - ) + IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog) ); } else if (indexInfoThreshold >= 0 && tookInNanos > indexInfoThreshold) { indexLogger.info( - IndexingSlowLogMessage.of( - this.slowLogFields.indexFields(), - index, - doc, - tookInNanos, - reformat, - maxSourceCharsToLog - ) + IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog) ); } else if (indexDebugThreshold >= 0 && tookInNanos > indexDebugThreshold) { indexLogger.debug( - IndexingSlowLogMessage.of( - this.slowLogFields.indexFields(), - index, - doc, - tookInNanos, - reformat, - maxSourceCharsToLog - ) + IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog) ); } else if (indexTraceThreshold >= 0 && tookInNanos > indexTraceThreshold) { indexLogger.trace( - IndexingSlowLogMessage.of( - this.slowLogFields.indexFields(), - index, - doc, - tookInNanos, - reformat, - maxSourceCharsToLog - ) + IndexingSlowLogMessage.of(this.slowLogFields.indexFields(), index, doc, tookInNanos, reformat, maxSourceCharsToLog) ); } } diff --git a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java index 0ebc33e0a5371..5e9f7bb99b31c 100644 --- a/server/src/main/java/org/elasticsearch/node/NodeConstruction.java +++ b/server/src/main/java/org/elasticsearch/node/NodeConstruction.java @@ -818,13 +818,15 @@ private void construct( return new SlowLogFields() { @Override public Map indexFields() { - return fields.stream().flatMap(f -> f.indexFields().entrySet().stream()) + return fields.stream() + .flatMap(f -> f.indexFields().entrySet().stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } @Override public Map searchFields() { - return fields.stream().flatMap(f -> f.searchFields().entrySet().stream()) + return fields.stream() + .flatMap(f -> f.searchFields().entrySet().stream()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } }; diff --git a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/slowlog/SecuritySlowLogFieldProvider.java b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/slowlog/SecuritySlowLogFieldProvider.java index 9a7a8fd7e86de..b5327b6779656 100644 --- a/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/slowlog/SecuritySlowLogFieldProvider.java +++ b/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/slowlog/SecuritySlowLogFieldProvider.java @@ -20,8 +20,7 @@ public class SecuritySlowLogFieldProvider implements SlowLogFieldProvider { private final Security plugin; - - private class SecuritySlowLogFields implements SlowLogFields{ + private class SecuritySlowLogFields implements SlowLogFields { private boolean includeUserInIndexing = false; private boolean includeUserInSearch = false;