From 6070cf6c2bdc73bab9da048820c752cd204e0125 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Sun, 4 May 2008 16:39:52 +0000 Subject: Extra log ouput for queue policy. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653249 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/Queue.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/broker/Queue.cpp') diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index 4ac061ac25..dc8c53ccf9 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -61,7 +61,8 @@ Queue::Queue(const string& _name, bool _autodelete, consumerCount(0), exclusive(0), noLocal(false), - persistenceId(0) + persistenceId(0), + policyExceeded(false) { if (parent != 0) { @@ -420,6 +421,10 @@ void Queue::push(boost::intrusive_ptr& msg){ if (policy.get()) { policy->enqueued(msg->contentSize()); if (policy->limitExceeded()) { + if (!policyExceeded) { + policyExceeded = true; + QPID_LOG(info, "Queue size exceeded policy for " << name); + } if (store) { QPID_LOG(debug, "Message " << msg << " on " << name << " released from memory"); msg->releaseContent(store); @@ -427,6 +432,11 @@ void Queue::push(boost::intrusive_ptr& msg){ QPID_LOG(warning, "Message " << msg << " on " << name << " exceeds the policy for the queue but can't be released from memory as the queue is not durable"); } + } else { + if (policyExceeded) { + policyExceeded = false; + QPID_LOG(info, "Queue size within policy for " << name); + } } } notify(); -- cgit v1.2.1