[libvirt] [PATCH 06/12] Pass the "raw" log message to each virLogOutputFunc

Daniel P. Berrange berrange at redhat.com
Thu Sep 27 12:17:44 UTC 2012


On Tue, Sep 25, 2012 at 03:09:22PM +0100, Daniel P. Berrange wrote:
> On Thu, Sep 20, 2012 at 08:24:05PM +0200, Miloslav Trmač wrote:
> > In addition to the preformatted text line, pass the raw message as well,
> > to allow the output functions to use a different output format.
> > 
> > This patch only changes the interface and callers, an output function
> > that takes advantage of this will follow.
> > 
> > Signed-off-by: Miloslav Trmač <mitr at redhat.com>
> > ---
> >  src/util/logging.c | 23 ++++++++++++++---------
> >  src/util/logging.h |  3 ++-
> >  tests/testutils.c  |  1 +
> >  3 files changed, 17 insertions(+), 10 deletions(-)
> 
> Independantly of my opinion of the patch series in general,
> I think something like this patch is worthwhile. I would
> take a slightly different approach though. Instead of passing
> the rawstr + str into the output functions, I'd only pass the
> rawstr, and actually move the virLogFormatString() call down
> into the output functions, instead of virLogVMessage

Urgh, sadly this turns out to not be practical because we need to populate
the in memory log buffer with the data.

So ACK to this patch - I'll apply it now.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list