[ovs-dev] [PATCH] collectors: Improve log message to better describe errors.

Alex Wang alexw at nicira.com
Fri Feb 7 00:43:12 UTC 2014


Looks good to me~


On Thu, Feb 6, 2014 at 4:16 PM, Ben Pfaff <blp at nicira.com> wrote:

> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  ofproto/collectors.c |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/ofproto/collectors.c b/ofproto/collectors.c
> index 919fa1b..4501d2b 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);
>              }
>          }
>      }
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20140206/6614bc0a/attachment-0003.html>


More information about the dev mailing list