Skip to content

Commit 78fb1ec

Browse files
authored
Fix log message format bugs (#118354) (#118387)
1 parent c7ec10d commit 78fb1ec

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

docs/changelog/118354.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118354
2+
summary: Fix log message format bugs
3+
area: Ingest Node
4+
type: bug
5+
issues: []

modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ public void onResponse(Void unused) {
987987
// should be no other processes interacting with the repository.
988988
logger.warn(
989989
Strings.format(
990-
"failed to clean up multipart upload [{}] of blob [{}][{}][{}]",
990+
"failed to clean up multipart upload [%s] of blob [%s][%s][%s]",
991991
abortMultipartUploadRequest.getUploadId(),
992992
blobStore.getRepositoryMetadata().name(),
993993
abortMultipartUploadRequest.getBucketName(),

qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/FullClusterRestartDownsampleIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private String getRollupIndexName() throws IOException {
264264
if (asMap.size() == 1) {
265265
return (String) asMap.keySet().toArray()[0];
266266
}
267-
logger.warn("--> No matching rollup name for path [%s]", endpoint);
267+
logger.warn("--> No matching rollup name for path [{}]", endpoint);
268268
return null;
269269
}
270270

qa/rolling-upgrade/src/javaRestTest/java/org/elasticsearch/upgrades/DownsampleIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private String getRollupIndexName() throws IOException {
239239
if (asMap.size() == 1) {
240240
return (String) asMap.keySet().toArray()[0];
241241
}
242-
logger.warn("--> No matching rollup name for path [%s]", endpoint);
242+
logger.warn("--> No matching rollup name for path [{}]", endpoint);
243243
return null;
244244
}
245245

server/src/internalClusterTest/java/org/elasticsearch/index/seqno/RetentionLeaseIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public void testRetentionLeasesSyncOnRecovery() throws Exception {
336336
.getShardOrNull(new ShardId(resolveIndex("index"), 0));
337337
final int length = randomIntBetween(1, 8);
338338
final Map<String, RetentionLease> currentRetentionLeases = new LinkedHashMap<>();
339-
logger.info("adding retention [{}}] leases", length);
339+
logger.info("adding retention [{}] leases", length);
340340
for (int i = 0; i < length; i++) {
341341
final String id = randomValueOtherThanMany(currentRetentionLeases.keySet()::contains, () -> randomAlphaOfLength(8));
342342
final long retainingSequenceNumber = randomLongBetween(0, Long.MAX_VALUE);

x-pack/plugin/downsample/src/main/java/org/elasticsearch/xpack/downsample/DownsampleShardIndexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public void collect(int docId, long owningBucketOrd) throws IOException {
386386

387387
if (logger.isTraceEnabled()) {
388388
logger.trace(
389-
"Doc: [{}] - _tsid: [{}], @timestamp: [{}}] -> downsample bucket ts: [{}]",
389+
"Doc: [{}] - _tsid: [{}], @timestamp: [{}] -> downsample bucket ts: [{}]",
390390
docId,
391391
DocValueFormat.TIME_SERIES_ID.format(tsidHash),
392392
timestampFormat.format(timestamp),

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public EnrichPlugin(final Settings settings) {
170170
if (settings.hasValue(CACHE_SIZE_SETTING_NAME)) {
171171
throw new IllegalArgumentException(
172172
Strings.format(
173-
"Both [{}] and [{}] are set, please use [{}]",
173+
"Both [%s] and [%s] are set, please use [%s]",
174174
CACHE_SIZE_SETTING_NAME,
175175
CACHE_SIZE_SETTING_BWC_NAME,
176176
CACHE_SIZE_SETTING_NAME

0 commit comments

Comments
 (0)