summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2013-03-18 19:18:53 +0530
committerAnand Avati <avati@redhat.com>2013-03-20 20:04:06 -0700
commit1d575d1706bf9968b84d10031bf4b2cfc571db91 (patch)
treefece01666c09e01c3715464782dfa973b8c45cb2 /rpc/rpc-transport/socket
parentf6d32dd6e8d0e4f52508162783b18828c0c363fa (diff)
socket: Associated IP:port information with error logs to make debugging easier
Change-Id: I4e7268f74b392c5cee8c7b8fc4bb5ab41d74dd04 BUG: 922780 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4686 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'rpc/rpc-transport/socket')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 526732b0a..e765dbb5b 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -509,8 +509,9 @@ __socket_rwv (rpc_transport_t *this, struct iovec *vector, int count,
if (write || (!write && priv->read_fail_log))
gf_log (this->name, GF_LOG_WARNING,
- "%s failed (%s)",
+ "%s on %s failed (%s)",
write ? "writev":"readv",
+ this->peerinfo.identifier,
strerror (errno));
if (priv->use_ssl) {
ssl_dump_error_stack(this->name);
@@ -2764,8 +2765,8 @@ socket_connect (rpc_transport_t *this, int port)
if (ret == -1 && ((errno != EINPROGRESS) && (errno != ENOENT))) {
gf_log (this->name, GF_LOG_ERROR,
- "connection attempt failed (%s)",
- strerror (errno));
+ "connection attempt on %s failed, (%s)",
+ this->peerinfo.identifier, strerror (errno));
close (priv->sock);
priv->sock = -1;
goto unlock;