yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #08323
[Bug 1269701] Re: log message level is unreasonable
Hi Fei Long Wang,thanks, as you said, it is not a big deal, but, IMHO, I don't think is recommended that if we want to find the reson of error in log, we should search in lots of INFO level or DEBUG lever log not the ERROR level log.
Additionally, if configured the debug and verbose False in the CONF. glance will don't record the error information in log files.
It is individual opinion only!
** Changed in: glance
Status: Invalid => New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1269701
Title:
log message level is unreasonable
Status in OpenStack Image Registry and Delivery Service (Glance):
New
Bug description:
In method glance.api.v1.images.Controller#_reserve, if an duplicate image uuid is specified, it will log the "debug" level message and raise error:
except exception.Duplicate:
msg = (_("An image with identifier %s already exists") %
image_meta['id'])
LOG.debug(msg)
raise HTTPConflict(explanation=msg,
In method glance.registry.api.v1.images.Controller#create,in the same case, glance will log the "error" level message and return error:
except exception.Duplicate:
msg = _("Image with identifier %s already exists!") % image_id
LOG.error(msg)
return exc.HTTPConflict(msg)
I think it should log error message when raise or return exceptions.
there are many similar cases in glance code.
is it a bug?
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1269701/+subscriptions
References