Add more debug/trace logging
- add delivery tag to inbound delivery logs - add trace logging to channel method calls **cherry-pick to 2.0.x, 1.7.x**
This commit is contained in:
committed by
Artem Bilan
parent
f3b977dbb9
commit
4fdb1e4ddf
@@ -947,6 +947,16 @@ public class CachingConnectionFactory extends AbstractConnectionFactory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
||||||
|
if (logger.isTraceEnabled() && !method.getName().equals("toString")
|
||||||
|
&& !method.getName().equals("hashCode") && !method.getName().equals("equals")) {
|
||||||
|
try {
|
||||||
|
logger.trace(this.target + " channel." + method.getName() + "("
|
||||||
|
+ (args != null ? Arrays.toString(args) : "") + ")");
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
// empty - some mocks fail here
|
||||||
|
}
|
||||||
|
}
|
||||||
String methodName = method.getName();
|
String methodName = method.getName();
|
||||||
if (methodName.equals("txSelect") && !this.transactional) {
|
if (methodName.equals("txSelect") && !this.transactional) {
|
||||||
throw new UnsupportedOperationException("Cannot start transaction on non-transactional channel");
|
throw new UnsupportedOperationException("Cannot start transaction on non-transactional channel");
|
||||||
|
|||||||
@@ -920,7 +920,9 @@ public class BlockingQueueConsumer implements RecoveryListener {
|
|||||||
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body)
|
public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Storing delivery for " + BlockingQueueConsumer.this);
|
logger.debug("Storing delivery for consumerTag: '"
|
||||||
|
+ consumerTag + "' with deliveryTag: '" + envelope.getDeliveryTag() + "' in "
|
||||||
|
+ BlockingQueueConsumer.this);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (BlockingQueueConsumer.this.abortStarted > 0) {
|
if (BlockingQueueConsumer.this.abortStarted > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user