[libvirt] [Patch 0/3]virsh: Patches for virsh logging

Supriya Kannery supriyak at linux.vnet.ibm.com
Thu Jun 30 08:22:08 UTC 2011


Virsh logging has some basic issues:
1. In code, magic numbers are used for logging rather than loglevel
   variables.
2. Magic number "5" is used for logging which doesn't map to any
   loglevel variable. Valid loglevel range is 0-4
3. Usage of loglevel variables doesn't align with that of libvirt 
   logging. In libvirt "DEBUG" loglevel is the superset and logs 
   messages at all other levels. Whereas in virsh, "ERROR" loglevel  
   behaves this way, which needs correction
4. virsh man page and code are inconsistent with respect to loglevels

Following patchset is to address the above mentioned issues.

1/3 - Avoid using magic numbers for logging
2/3 - Align log level usage to that of libvirt
3/3 - Update virsh manpage with related changes

tools/virsh.pod |   30 ++++++++++++
tools/virsh.c   |  124 +++++++++++++++++++++++++++---------------------
2 files changed, 102 insertions(+), 52 deletions(-)




More information about the libvir-list mailing list