Gordon Sim wrote:
[EMAIL PROTECTED] 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)