This is an automated email from the ASF dual-hosted git repository.

Technoboy- pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 0517f4822118f1ae728db699c9b9f0da4e5667a8
Author: Jiwei Guo <[email protected]>
AuthorDate: Tue May 12 09:45:49 2026 +0800

    fix log
---
 .../service/schema/BookkeeperSchemaStorage.java     | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java
index 3d5ee246c22..40cc59c6a15 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/BookkeeperSchemaStorage.java
@@ -383,19 +383,13 @@ public class BookkeeperSchemaStorage implements 
SchemaStorage {
                     return;
                 }
                 Throwable cause = FutureUtil.unwrapCompletionException(ex);
-                log.warn()
-                        .attr("schemaId", schemaId)
-                        .attr("ledgerId", position.getLedgerId())
-                        .exception(cause)
-                        .log("Failed to create schema locator with position");
+                log.warn("Failed to create schema locator with position, 
schemaId {}, ledgerId {}",
+                        schemaId, position.getLedgerId(), ex);
                 if (cause instanceof AlreadyExistsException || cause 
instanceof BadVersionException) {
                     bookKeeper.asyncDeleteLedger(position.getLedgerId(), (rc, 
ctx) -> {
                         if (rc != BKException.Code.OK) {
-                            log.warn()
-                                    .attr("schemaId", schemaId)
-                                    .attr("ledgerId", position.getLedgerId())
-                                    .attr("rc", rc)
-                                    .log("Failed to delete orphan ledger after 
schema locator creation failed");
+                            log.warn("Failed to delete orphan ledger after 
schema locator creation"
+                                    + " failed, schemaId {}, ledgerId {}, rc: 
{}", schemaId, position.getLedgerId(), rc);
                         }
                     }, null);
                 }
@@ -512,11 +506,8 @@ public class BookkeeperSchemaStorage implements 
SchemaStorage {
         ).thenApply(ignore -> nextVersion).whenComplete((__, ex) -> {
             if (ex != null) {
                 Throwable cause = FutureUtil.unwrapCompletionException(ex);
-                log.warn()
-                        .attr("schemaId", schemaId)
-                        .attr("ledgerId", position.getLedgerId())
-                        .exception(cause)
-                        .log("Failed to update schema locator with position");
+                log.warn("Failed to update schema locator with position, 
schemaId {}, ledgerId {}",
+                        schemaId, position.getLedgerId(), ex);
                 if (cause instanceof AlreadyExistsException || cause 
instanceof BadVersionException) {
                     bookKeeper.asyncDeleteLedger(position.getLedgerId(), new 
AsyncCallback.DeleteCallback() {
                         @Override

Reply via email to