Author: aconway
Date: Tue Jan 29 07:49:55 2008
New Revision: 616404

URL: http://svn.apache.org/viewvc?rev=616404&view=rev
Log:
Log peer address with SEND/RECV messages.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp?rev=616404&r1=616403&r2=616404&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp Tue Jan 29 
07:49:55 2008
@@ -59,6 +59,7 @@
     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 @@
         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 @@
 
     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


Reply via email to