diff options
author | Alan Conway <aconway@apache.org> | 2008-01-29 15:49:55 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-01-29 15:49:55 +0000 |
commit | f2ae189ff50940ec9ea148fb12d720d5eedd0b79 (patch) | |
tree | 21e616a74890c9d22a9a63b1322328acdeeea4ef /cpp | |
parent | ce619176d1cd8ecea8f03e5730205a6c61c05479 (diff) | |
download | qpid-python-f2ae189ff50940ec9ea148fb12d720d5eedd0b79.tar.gz |
Log peer address with SEND/RECV messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@616404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/client/Connector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp index 4fb5aa6b4d..f13649a24e 100644 --- a/cpp/src/qpid/client/Connector.cpp +++ b/cpp/src/qpid/client/Connector.cpp @@ -59,6 +59,7 @@ void Connector::connect(const std::string& host, int port){ Mutex::ScopedLock l(closedLock); assert(closed); socket.connect(host, port); + identifier=socket.getPeerAddress(); closed = false; poller = Poller::shared_ptr(new Poller); aio = new AsynchIO(socket, @@ -191,7 +192,7 @@ void Connector::Writer::handle(framing::AMQFrame& frame) { lastEof = frames.size(); aio->notifyPendingWrite(); } - QPID_LOG(trace, "SENT [" << this << "]: " << frame); + QPID_LOG(trace, "SENT (" << aio->getSocket().getPeerAddress() << "): " << frame); } void Connector::Writer::writeOne(const Mutex::ScopedLock& l) { @@ -234,7 +235,7 @@ void Connector::readbuff(AsynchIO& aio, AsynchIO::BufferBase* buff) { AMQFrame frame; while(frame.decode(in)){ - QPID_LOG(trace, "RECV [" << this << "]: " << frame); + QPID_LOG(trace, "RECV (" << identifier << "): " << frame); input->received(frame); } // TODO: unreading needs to go away, and when we can cope |