[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] [PATCH] output virsh log to file



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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]