You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2008/01/30 14:16:50 UTC

Re: svn commit: r616404 - /incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp

aconway@apache.org wrote:
> 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.
> 

> -    QPID_LOG(trace, "SENT [" << this << "]: " << frame);
> +    QPID_LOG(trace, "SENT (" << aio->getSocket().getPeerAddress() << "): " << frame);

While I agree that the peer address is more informative, it doesn't help 
distinguish between multiple connections in an application to the same 
broker.

Adding the local address would help this, but might add a bit too much 
noise to every log entry. Either that could be cut back to be just the 
local port or we could keep using this in the log entries and log both 
local and remote addresses once when the connection is established.

Thoughts?

Re: svn commit: r616404 - /incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp

Posted by Gordon Sim <gs...@redhat.com>.
Alan Conway wrote:
> Adding just the local port is probably the best solution. It has the 
> added advantage that it allows you to easily correlate frames on client 
> and server since both will contain the client's port number. Something 
> like: (127.0.0.1:5672 59007)

Agreed and done (I put the local port before the remote address as 
left-to-right seemed somehow more intuitive to me!).

Re: svn commit: r616404 - /incubator/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp

Posted by Alan Conway <ac...@redhat.com>.
Gordon Sim wrote:
> aconway@apache.org wrote:
>> 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.
>>
> 
>> -    QPID_LOG(trace, "SENT [" << this << "]: " << frame);
>> +    QPID_LOG(trace, "SENT (" << aio->getSocket().getPeerAddress() << 
>> "): " << frame);
> 
> While I agree that the peer address is more informative, it doesn't help 
> distinguish between multiple connections in an application to the same 
> broker.
> 
> Adding the local address would help this, but might add a bit too much 
> noise to every log entry. Either that could be cut back to be just the 
> local port or we could keep using this in the log entries and log both 
> local and remote addresses once when the connection is established.
> 
> Thoughts?

Adding just the local port is probably the best solution. It has the 
added advantage that it allows you to easily correlate frames on client 
and server since both will contain the client's port number. Something 
like: (127.0.0.1:5672 59007)

Using a pointer makes the logs hard to process with grep and the like, 
since you can't interpret a log line in isolation, you have to go back 
and find the original connect line (and you have to still *have* the 
original connect line)