[libvirt] [RFC Patch 2/3]virsh: Change log level order
Eric Blake
eblake at redhat.com
Thu May 19 23:43:14 UTC 2011
On 05/09/2011 01:08 AM, Supriya Kannery wrote:
> Change log level order so that messages at all other levels get logged for "DEBUG" level.
> Replace log level "5" with log level "4" (DEBUG).
>
> Signed-off-by: Supriya Kannery <supriyak at in.ibm.com>
> ---
> tools/virsh.c | 100 +++++++++++++++++++++++++++++-----------------------------
> 1 file changed, 50 insertions(+), 50 deletions(-)
>
> Index: libvirt/tools/virsh.c
> ===================================================================
> --- libvirt.orig/tools/virsh.c
> +++ libvirt/tools/virsh.c
> @@ -91,11 +91,11 @@ static char *progname;
> * Indicates the level of a log message
> */
> typedef enum {
> - VSH_ERR_DEBUG = 0,
> - VSH_ERR_INFO,
> - VSH_ERR_NOTICE,
> + VSH_ERR_ERROR = 0,
> VSH_ERR_WARNING,
> - VSH_ERR_ERROR
> + VSH_ERR_NOTICE,
> + VSH_ERR_INFO,
> + VSH_ERR_DEBUG,
> } vshErrorLevel;
I like this part.
>
> /*
> @@ -2103,7 +2103,7 @@ cmdDominfo(vshControl *ctl, const vshCmd
>
> /* Check and display whether the domain is persistent or not */
> persistent = virDomainIsPersistent(dom);
> - vshDebug(ctl, 5, "Domain persistent flag value: %d\n", persistent);
> + vshDebug(ctl, 4, "Domain persistent flag value: %d\n", persistent);
Please resubmit by using VSH_ERR_DEBUG rather than the magic number '5'
(or '4') in all of these vshDebug statements. If we're going to clean
up this code, let's clean it up right.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110519/4246b6a7/attachment-0001.sig>
More information about the libvir-list
mailing list