summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-01-29 15:49:55 +0000
committerAlan Conway <aconway@apache.org>2008-01-29 15:49:55 +0000
commit57ccd1246b085d67b91331e592c83313828999b9 (patch)
tree425b48602b7e7893cecf13d5a62cfd3a258015aa /qpid/cpp/src
parent21e051ff12fb378fa6dc6db1a8a319d645418fe9 (diff)
downloadqpid-python-57ccd1246b085d67b91331e592c83313828999b9.tar.gz
Log peer address with SEND/RECV messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@616404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/client/Connector.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/client/Connector.cpp b/qpid/cpp/src/qpid/client/Connector.cpp
index 4fb5aa6b4d..f13649a24e 100644
--- a/qpid/cpp/src/qpid/client/Connector.cpp
+++ b/qpid/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