[Spice-devel] [PATCH spice-server] log: Do not print function name twice during logging

Marc-André Lureau marcandre.lureau at redhat.com
Sun Jun 18 08:09:16 UTC 2017


Hi

----- Original Message -----
> On Fri, 2017-06-16 at 17:37 +0100, Frediano Ziglio wrote:
> > spice_error/spice_warning already print location information
> > so don't print them twice.
> 
> Acked-by: Jonathon Jongmsa <jjongsma at redhat.com>
> 
> (By the way, if I remember correctly, Marc-Andre's proposed logging
> patches removed this location/function information from the debug
> messages. )
> 

Wait for the next iteration :)

> 
> > 
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> >  server/red-record-qxl.c | 6 +++---
> >  server/red-replay-qxl.c | 2 +-
> >  server/reds.c           | 3 +--
> >  3 files changed, 5 insertions(+), 6 deletions(-)
> > 
> > diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
> > index f65b0bf..400d67c 100644
> > --- a/server/red-record-qxl.c
> > +++ b/server/red-record-qxl.c
> > @@ -316,7 +316,7 @@ static void red_record_image(FILE *fd,
> > RedMemSlotInfo *slots, int group_id,
> >          spice_assert(size == qxl->quic.data_size);
> >          break;
> >      default:
> > -        spice_error("%s: unknown type %d", __FUNCTION__, qxl-
> > >descriptor.type);
> > +        spice_error("unknown type %d", qxl->descriptor.type);
> >      }
> >  }
> >  
> > @@ -595,7 +595,7 @@ static void red_record_native_drawable(FILE *fd,
> > RedMemSlotInfo *slots, int grou
> >          red_record_composite_ptr(fd, slots, group_id, &qxl-
> > >u.composite, flags);
> >          break;
> >      default:
> > -        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
> > +        spice_error("unknown type %d", qxl->type);
> >          break;
> >      };
> >  }
> > @@ -663,7 +663,7 @@ static void red_record_compat_drawable(FILE *fd,
> > RedMemSlotInfo *slots, int grou
> >          red_record_whiteness_ptr(fd, slots, group_id, &qxl-
> > >u.whiteness, flags);
> >          break;
> >      default:
> > -        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
> > +        spice_error("unknown type %d", qxl->type);
> >          break;
> >      };
> >  }
> > diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
> > index 6915f00..3c0f528 100644
> > --- a/server/red-replay-qxl.c
> > +++ b/server/red-replay-qxl.c
> > @@ -1063,7 +1063,7 @@ static QXLCompatDrawable
> > *red_replay_compat_drawable(SpiceReplay *replay, uint32
> >          red_replay_whiteness_ptr(replay, &qxl->u.whiteness, flags);
> >          break;
> >      default:
> > -        spice_error("%s: unknown type %d", __FUNCTION__, qxl->type);
> > +        spice_error("unknown type %d", qxl->type);
> >          break;
> >      };
> >      return qxl;
> > diff --git a/server/reds.c b/server/reds.c
> > index a569a6e..4aeac9a 100644
> > --- a/server/reds.c
> > +++ b/server/reds.c
> > @@ -2592,8 +2592,7 @@ static int reds_init_socket(const char *addr,
> > int portnr, int family)
> >          }
> >          close(slisten);
> >      }
> > -    spice_warning("%s: binding socket to %s:%d failed",
> > __FUNCTION__,
> > -                  addr, portnr);
> > +    spice_warning("binding socket to %s:%d failed", addr, portnr);
> >      freeaddrinfo(res);
> >      return -1;
> >  
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list