Fix log in PersistentTopicsBase#getPartitionedTopicMetadata
@@ -3621,15 +3621,14 @@ public class PersistentTopicsBase extends AdminResource {
validateAdminAccessForTenant(pulsar,
clientAppId, originalPrincipal, topicName.getTenant(), authenticationData);
} catch (RestException authException) {
- log.warn("Failed to authorize {} on cluster {}", clientAppId, topicName.toString());
+ log.warn("Failed to authorize {} on topic {}", clientAppId, topicName);
throw new PulsarClientException(String.format("Authorization failed %s on topic %s with error %s",
- clientAppId, topicName.toString(), authException.getMessage()));
+ clientAppId, topicName, authException.getMessage()));
}
} catch (Exception ex) {
// throw without wrapping to PulsarClientException that considers: unknown error marked as internal
// server error
- log.warn("Failed to authorize {} on cluster {} with unexpected exception {}", clientAppId,
- topicName.toString(), ex.getMessage(), ex);
+ log.warn("Failed to authorize {} on topic {}", clientAppId, topicName, ex);
throw ex;
}
