diff options
author | Ben Pfaff <blp@nicira.com> | 2014-02-06 15:05:04 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-02-07 08:30:26 -0800 |
commit | 62d7cc843aad559b585213a28ddfb509b1b80927 (patch) | |
tree | 9ccd45f4ca5f7c141489ab6d7cbe5c6081a8b23d /ofproto/collectors.c | |
parent | 9a1a10918615d2138d93a315a6af83253e9d88dd (diff) | |
download | openvswitch-62d7cc843aad559b585213a28ddfb509b1b80927.tar.gz |
collectors: Improve log message to better describe errors.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ofproto/collectors.c')
-rw-r--r-- | ofproto/collectors.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ofproto/collectors.c b/ofproto/collectors.c index 919fa1b8d..4501d2b21 100644 --- a/ofproto/collectors.c +++ b/ofproto/collectors.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2013 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2013, 2014 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -112,8 +112,10 @@ collectors_send(const struct collectors *c, const void *payload, size_t n) for (i = 0; i < c->n_fds; i++) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); if (send(c->fds[i], payload, n, 0) == -1) { - VLOG_WARN_RL(&rl, "sending to collector failed: %s", - ovs_strerror(errno)); + char *s = describe_fd(c->fds[i]); + VLOG_WARN_RL(&rl, "%s: sending to collector failed (%s)", + s, ovs_strerror(errno)); + free(s); } } } |