diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2007-10-09 18:18:51 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2007-10-09 18:18:51 +0000 |
| commit | 1167f093eaf4f03e2b7422388d6a70deb53f9e61 (patch) | |
| tree | 58d91e7f233257be9808daa44bfae373c340aecb /cpp/src | |
| parent | 5f5076fa457904d18b2612979e75083bba32a6ca (diff) | |
| download | qpid-python-1167f093eaf4f03e2b7422388d6a70deb53f9e61.tar.gz | |
Added some debug logs to indicate credit levels and verify if a message is enqueued.
I found it useful during testing
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@583253 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 1 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/SemanticState.cpp | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 95fff2e789..e190a82485 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -80,6 +80,7 @@ void Queue::deliver(Message::shared_ptr& msg){ }else { push(msg); } + QPID_LOG(debug, "Message Enqueued: " << msg->getApplicationHeaders()); serializer.execute(dispatchCallback); } } diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp index cf16541949..ade79cb5c4 100644 --- a/cpp/src/qpid/broker/SemanticState.cpp +++ b/cpp/src/qpid/broker/SemanticState.cpp @@ -255,6 +255,7 @@ bool SemanticState::ConsumerImpl::deliver(QueuedMessage& msg) DeliveryId deliveryTag = parent->deliveryAdapter.deliver(msg.payload, token); + QPID_LOG(debug, "Message delivered for destination " << name); if (windowing || ackExpected) { parent->record(DeliveryRecord(msg, queue, name, token, deliveryTag, acquire, !ackExpected)); } @@ -265,9 +266,11 @@ bool SemanticState::ConsumerImpl::deliver(QueuedMessage& msg) bool SemanticState::ConsumerImpl::checkCredit(Message::shared_ptr& msg) { + QPID_LOG(debug, "Credit check for destination " << name << " byteCredit: " << byteCredit << " msgCredit: " << msgCredit); Mutex::ScopedLock l(lock); if (msgCredit == 0 || (byteCredit != 0xFFFFFFFF && byteCredit < msg->getRequiredCredit())) { return false; + QPID_LOG(debug, "Credit is empty for destination " << name); } else { if (msgCredit != 0xFFFFFFFF) { msgCredit--; @@ -475,12 +478,14 @@ void SemanticState::setCreditMode(const std::string& destination) void SemanticState::addByteCredit(const std::string& destination, uint32_t value) { find(destination).addByteCredit(value); + QPID_LOG(debug, "Byte Credits Requested for " << destination << ": " << value); } void SemanticState::addMessageCredit(const std::string& destination, uint32_t value) { find(destination).addMessageCredit(value); + QPID_LOG(debug, "Message Credit Requested for " << destination << ": " << value); } void SemanticState::flush(const std::string& destination) |
