[Libvir] [PATCH] output virsh log to file

Atsushi SAKAI sakaia at jp.fujitsu.com
Thu May 24 08:32:28 UTC 2007

Hi, Rich

Thank you for your suggestion.

We also think this kind of solution.
But from our view, 
the best solution is inclusion of this patch to libvirt.
the second solution is to use your suggestion.

So his mail is asking the logging policy of libvirt.

Atsushi SAKAI

"Richard W.M. Jones" <rjones at redhat.com> wrote:

> Nobuhiro Itou wrote:
> > Certainly, virsh does not provide enough information now.
> > But I want virsh to provide useful information in the future.
> > First, I want to implement this logging function.
> > 
> > In addition, I think that we should not let customers take trouble. 
> > 
> > Cannot you apply this patch? 
> The trouble is - the maintainers of libvirt have to maintain and live
> with this patch forever, so they need to make sure it's right before it
> goes in.
> I wonder if a simpler solution can't be found which doesn't impact
> libvirt/virsh codebase at all, but still allows persistent logging.  If
> you wrap virsh in a shell script which runs logger, something like this:
> ------------------------------
> #!/bin/bash -
> real_virsh=/usr/bin/virsh
> $real_virsh "$@" 2> >(logger -t virsh)
> ------------------------------
> (Well, that's not quite right because it _only_ sends stderr to syslog, 
> but it's easy to fix that using something like 'tee').
> This doesn't have any maintenance impact on libvirt code.  It sends logs 
> to where users will expect to find them.  Log rotation is handled. 
> Remote logging is handled.  And it's probably a lot more secure.
> Rich.
> -- 
> Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
> Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
> Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
> England and Wales under Company Registration No. 03798903

More information about the libvir-list mailing list