Stop logging API not found as ERROR

Currently if the user requests and object that is not found the API
will log this as an "ERRROR" level message.
This patch changes this to be a debug message as lookup of objects
that have been deleted is a normal occurrence.

Change-Id: I4e0db4b05b8636c40a62928e0b462ae73236eea0
This commit is contained in:
Michael Johnson 2018-06-17 14:06:53 -07:00
parent 13eab152fb
commit 58b7d9a039

View File

@ -58,8 +58,8 @@ class BaseController(rest.RestController):
"""Gets an object from the database and returns it.""" """Gets an object from the database and returns it."""
db_obj = repo.get(session, id=id, show_deleted=show_deleted) db_obj = repo.get(session, id=id, show_deleted=show_deleted)
if not db_obj: if not db_obj:
LOG.exception('%(name)s %(id)s not found', LOG.debug('%(name)s %(id)s not found',
{'name': data_model._name(), 'id': id}) {'name': data_model._name(), 'id': id})
raise exceptions.NotFound( raise exceptions.NotFound(
resource=data_model._name(), id=id) resource=data_model._name(), id=id)
return db_obj return db_obj