Skip to content

Commit e238df3

Browse files
committed
logging changes
1 parent c454b63 commit e238df3

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/main/java/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public class ConnectionFactory implements Cloneable {
127127

128128
private boolean automaticRecovery = true;
129129
private boolean topologyRecovery = true;
130-
private int topologyRecoveryThreads = 1;
130+
private int topologyRecoveryThreads = 1;
131131

132132
// long is used to make sure the users can use both ints
133133
// and longs safely. It is unlikely that anybody'd need

src/main/java/com/rabbitmq/client/impl/recovery/AutorecoveringConnection.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ private synchronized void beginAutomaticRecovery() throws InterruptedException {
536536
if (newConn == null) {
537537
return;
538538
}
539-
539+
LOGGER.debug("Connection {} has recovered", newConn);
540540
this.addAutomaticRecoveryListener(newConn);
541541
this.recoverShutdownListeners(newConn);
542542
this.recoverBlockedListeners(newConn);
@@ -591,7 +591,6 @@ private RecoveryAwareAMQConnection recoverConnection() throws InterruptedExcepti
591591

592592
private void recoverChannels(final RecoveryAwareAMQConnection newConn) {
593593
for (AutorecoveringChannel ch : this.channels.values()) {
594-
LOGGER.debug("Recovering channel {}", ch);
595594
try {
596595
ch.automaticallyRecover(this, newConn);
597596
LOGGER.debug("Channel {} has recovered", ch);
@@ -652,10 +651,9 @@ private void recoverTopology(final int recoveryThreads) throws InterruptedExcept
652651

653652
private void recoverExchange(final RecordedExchange x) {
654653
// recorded exchanges are guaranteed to be non-predefined (we filter out predefined ones in exchangeDeclare). MK.
655-
LOGGER.debug("Recovering exchange {}", x);
656654
try {
657655
x.recover();
658-
LOGGER.debug("Exchange {} has recovered", x);
656+
LOGGER.debug("{} has recovered", x);
659657
} catch (Exception cause) {
660658
final String message = "Caught an exception while recovering exchange " + x.getName() +
661659
": " + cause.getMessage();
@@ -665,7 +663,7 @@ private void recoverExchange(final RecordedExchange x) {
665663
}
666664

667665
private void recoverQueue(final String oldName, final RecordedQueue q) {
668-
LOGGER.debug("Recovering queue {}", q);
666+
LOGGER.debug("Recovering {}", q);
669667
try {
670668
q.recover();
671669
String newName = q.getName();
@@ -688,7 +686,7 @@ private void recoverQueue(final String oldName, final RecordedQueue q) {
688686
for (QueueRecoveryListener qrl : Utility.copy(this.queueRecoveryListeners)) {
689687
qrl.queueRecovered(oldName, newName);
690688
}
691-
LOGGER.debug("Queue {} has recovered", q);
689+
LOGGER.debug("{} has recovered", q);
692690
} catch (Exception cause) {
693691
final String message = "Caught an exception while recovering queue " + oldName +
694692
": " + cause.getMessage();
@@ -698,10 +696,9 @@ private void recoverQueue(final String oldName, final RecordedQueue q) {
698696
}
699697

700698
private void recoverBinding(final RecordedBinding b) {
701-
LOGGER.debug("Recovering binding {}", b);
702699
try {
703700
b.recover();
704-
LOGGER.debug("Binding {} has recovered", b);
701+
LOGGER.debug("{} has recovered", b);
705702
} catch (Exception cause) {
706703
String message = "Caught an exception while recovering binding between " + b.getSource() +
707704
" and " + b.getDestination() + ": " + cause.getMessage();
@@ -711,7 +708,7 @@ private void recoverBinding(final RecordedBinding b) {
711708
}
712709

713710
private void recoverConsumer(final String tag, final RecordedConsumer consumer) {
714-
LOGGER.debug("Recovering consumer {}", consumer);
711+
LOGGER.debug("Recovering {}", consumer);
715712
try {
716713
String newTag = consumer.recover();
717714
// make sure server-generated tags are re-added. MK.
@@ -726,7 +723,7 @@ private void recoverConsumer(final String tag, final RecordedConsumer consumer)
726723
for (ConsumerRecoveryListener crl : Utility.copy(this.consumerRecoveryListeners)) {
727724
crl.consumerRecovered(tag, newTag);
728725
}
729-
LOGGER.debug("Consumer {} has recovered", consumer);
726+
LOGGER.debug("{} has recovered", consumer);
730727
} catch (Exception cause) {
731728
final String message = "Caught an exception while recovering consumer " + tag +
732729
": " + cause.getMessage();

0 commit comments

Comments
 (0)