[Libvir] [PATCH] output virsh log to file

Richard W.M. Jones rjones at redhat.com
Tue May 29 10:52:08 UTC 2007

Daniel Veillard wrote:

Morning Daniel,

>   My experience with systematic logging at command line level is that
> you end up polluting your file system with (hidden) log files, and while it
> may be fine for a developper it's not something you want to inflict to
> your customers. Also the fixed name for the log file makes it easilly
> useless, a random run in the same directory will just wipe out the
> data you tried to collect in a separate process. 
>   I think having permanent systematic logging to a fixed file is not
> proper, I would rather not use that.


>   But since the patch is relatively simple based on existing virsh logging
> code, I think this could go as a command line option for virsh, for example
>    --log filename
> where the detailed logs can then be saved if needed when a problem occurs.
> I think this would avoid the main drawbacks of your proposed patch.

Did you see my other response to this?


That script, modified a bit further (see attachment) does logging fairly 
well.  Having it invoked as a wrapper/replacement for virsh is just a 
matter of packaging.


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virsh.sh
Type: application/x-shellscript
Size: 97 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070529/74ad71d6/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070529/74ad71d6/attachment-0003.bin>

More information about the libvir-list mailing list