summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ClientConnection.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-07-05 09:47:07 +0000
committerGordon Sim <gsim@apache.org>2007-07-05 09:47:07 +0000
commit07c8c499649c725a226eeda3e0bfe58fa8ba984c (patch)
tree0f71fc80b9e6e9929184334f4dc7d8fc03f7ccc0 /cpp/src/qpid/client/ClientConnection.cpp
parentd4be469092c558ca9031d82b963b8b845fa1e1bd (diff)
downloadqpid-python-07c8c499649c725a226eeda3e0bfe58fa8ba984c.tar.gz
Fix for QPID-534. Get now detects closure correctly. Also fixed broker to allow channel.close-ok (and fixed client to send it).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ClientConnection.cpp')
-rw-r--r--cpp/src/qpid/client/ClientConnection.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/ClientConnection.cpp b/cpp/src/qpid/client/ClientConnection.cpp
index bddadb0800..102de555fd 100644
--- a/cpp/src/qpid/client/ClientConnection.cpp
+++ b/cpp/src/qpid/client/ClientConnection.cpp
@@ -25,6 +25,8 @@
#include "Connection.h"
#include "ClientChannel.h"
#include "ClientMessage.h"
+#include "qpid/log/Logger.h"
+#include "qpid/log/Options.h"
#include "qpid/log/Statement.h"
#include "qpid/QpidError.h"
#include <iostream>
@@ -49,6 +51,9 @@ Connection::Connection(
isOpen(false), debug(_debug)
{
setConnector(defaultConnector);
+ qpid::log::Options o;
+ o.trace = debug;
+ qpid::log::Logger::instance().configure(o, "qpid-c++-client");
}
Connection::~Connection(){}
@@ -143,6 +148,7 @@ void Connection::received(AMQFrame& frame){
try{
channel->getHandlers().in->handle(frame);
}catch(const qpid::QpidError& e){
+ std::cout << "Caught error while handling " << frame << ": " << e.what() <<std::endl;
channelException(
*channel, dynamic_cast<AMQMethodBody*>(frame.getBody().get()), e);
}