[Libvir] [PATCH] output virsh log to file

Daniel P. Berrange berrange at redhat.com
Tue May 22 19:32:47 UTC 2007


On Tue, May 22, 2007 at 03:15:03PM +0100, Richard W.M. Jones wrote:
> Nobuhiro Itou wrote:
> >>But my broader point is: What use would this feature be, since you can 
> >>capture the output of virsh easily using shell redirection?  The Xen 
> >>'xm' command doesn't have this feature and I don't know if anyone has 
> >>asked for it.
> >
> >If I use it, the redirection is no problem.
> >However, when our customers are made to use virsh, it is necessary to 
> >explain the redirection.
> >Mostly, a lot of customers do not seem to use the redirection usually. 
> >And, executing the command applying the redirection to customers again 
> >when the error occurs is troublesome of customers. 
> >
> >Therefore, the purpose is to make it immediately correspond to 
> >the customer's trouble report.
> 
> Technically I think you've fixed all the problems I raised.
> 
> I really think we should be looking at either a logging library, or 
> (better) syslog.  These problems -- like logfile maxsize, logfile 
> location, log rotation -- have all been solved before, and I don't 
> believe we should reinvent this wheel.
> 
> I'm keen to hear what others think though.

I'm not convinced that virsh should have / needs persistent logging like
this. The commands run via it really map straight onto individual APIs,
and as such the error from any one command has no where near enough context
to provide useful information. The virt-install/virt-manager logs are useful
because they typically do have a good amount of context logged enabling easy
error diagnosis fro the logs. I just don't see logs from virsh being anymore
useful, than the stuff already printed on STDOUT/STDERR which a user will
already cut+paste into bug repots quite happily. 

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list