Skip to content

Commit

Permalink
[fix][broker] Add principal name into info log to enhance analysis an…
Browse files Browse the repository at this point in the history
…d troubleshooting (#23257)
  • Loading branch information
rdhabalia authored Sep 5, 2024
1 parent a28c0df commit 6c300f5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1257,8 +1257,8 @@ protected void handleSubscribe(final CommandSubscribe subscribe) {
remoteAddress, getPrincipal());
}

log.info("[{}] Subscribing on topic {} / {}. consumerId: {}", this.toString(),
topicName, subscriptionName, consumerId);
log.info("[{}] Subscribing on topic {} / {}. consumerId: {}, role: {}", this.toString(), topicName,
subscriptionName, consumerId, getPrincipal());
try {
Metadata.validateMetadata(metadata,
service.getPulsar().getConfiguration().getMaxConsumerMetadataSize());
Expand Down Expand Up @@ -1748,7 +1748,7 @@ private void buildProducerAndAddTopic(Topic topic, long producerId, String produ
topic.addProducer(producer, producerQueuedFuture).thenAccept(newTopicEpoch -> {
if (isActive()) {
if (producerFuture.complete(producer)) {
log.info("[{}] Created new producer: {}", remoteAddress, producer);
log.info("[{}] Created new producer: {}, role: {}", remoteAddress, producer, getPrincipal());
commandSender.sendProducerSuccessResponse(requestId, producerName,
producer.getLastSequenceId(), producer.getSchemaVersion(),
newTopicEpoch, true /* producer is ready now */);
Expand Down

0 comments on commit 6c300f5

Please sign in to comment.