From adec340da142b3b31bc9d19d14f5cfcae0ea1304 Mon Sep 17 00:00:00 2001 From: Zike Yang Date: Tue, 10 Sep 2024 15:25:02 +0800 Subject: [PATCH] [fix][broker] fix the log format error in the AdminResource ## Motivation The log message in `AdminResource` was missing a parameter. The `topicName` was not being included in the success log message when creating partitioned topics for remote clusters. This results the following errors: ``` ERROR Unable to format msg: [{}] Successfully created partitioned for topic {} for the remote clusters java.lang.IllegalArgumentException: found 2 argument placeholders, but provided 1 for pattern `[{}] Successfully created partitioned for topic {} for the remote clusters` ``` ## Modifications Corrected the log message by adding the missing `topicName` parameter to the success log entry in the `internalCreatePartitionedTopicToReplicatedClustersInBackground` method. --- .../main/java/org/apache/pulsar/broker/admin/AdminResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java index 497af71955158..d42dff39a8a0d 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java @@ -613,7 +613,7 @@ protected void internalCreatePartitionedTopic(AsyncResponse asyncResponse, int n && pulsar().getConfig().isCreateTopicToRemoteClusterForReplication()) { internalCreatePartitionedTopicToReplicatedClustersInBackground(numPartitions); log.info("[{}] Successfully created partitioned for topic {} for the remote clusters", - clientAppId()); + clientAppId(), topicName); } else { log.info("[{}] Skip creating partitioned for topic {} for the remote clusters", clientAppId(), topicName);