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 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 redhat com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature