Skip to content

Commit 3bbd796

Browse files
authored
Merge branch 'master' into 1001-yuluo/infra-zk
2 parents 3c33631 + c94c64c commit 3bbd796

File tree

1 file changed

+2
-2
lines changed
  • shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-elasticsearch/src/main/java/org/apache/shenyu/plugin/logging/elasticsearch/client

1 file changed

+2
-2
lines changed

shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-elasticsearch/src/main/java/org/apache/shenyu/plugin/logging/elasticsearch/client/ElasticSearchLogCollectClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ public void consume0(@NonNull final List<ShenyuRequestLog> logs) {
112112
List<BulkOperation> bulkOperations = new ArrayList<>();
113113
logs.forEach(log -> {
114114
try {
115-
bulkOperations.add(new BulkOperation.Builder().create(d -> d.document(log).index(indexName)).build());
115+
bulkOperations.add(new BulkOperation.Builder().create(d -> d.document(log).index(actualIndex)).build());
116116
} catch (Exception e) {
117117
LogUtils.error(LOG, "add logs error: ", e);
118118
}
119119
});
120120
// Bulk storage
121121
try {
122-
client.bulk(e -> e.index(indexName).operations(bulkOperations));
122+
client.bulk(e -> e.index(actualIndex).operations(bulkOperations));
123123
} catch (Exception e) {
124124
LogUtils.error(LOG, "elasticsearch store logs error: ", e);
125125
}

0 commit comments

Comments
 (0)