Update logging messages
Change-Id: I33be28339b0f86472aafb85f53c8adb17c9ceece
This commit is contained in:
parent
ef89cae691
commit
c1ed166a38
@ -158,10 +158,8 @@ def create_or_update(context, artifact_id, values, session):
|
|||||||
artifact.activated_at = timeutils.utcnow()
|
artifact.activated_at = timeutils.utcnow()
|
||||||
artifact.update(values)
|
artifact.update(values)
|
||||||
|
|
||||||
LOG.debug('Sending request to the database. '
|
|
||||||
'New values are %s', values)
|
|
||||||
artifact.save(session=session)
|
artifact.save(session=session)
|
||||||
LOG.debug('Response from the database was received.')
|
LOG.debug("Response from the database was received.")
|
||||||
|
|
||||||
return artifact.to_dict()
|
return artifact.to_dict()
|
||||||
|
|
||||||
|
@ -94,11 +94,11 @@ class LockEngine(object):
|
|||||||
"""
|
"""
|
||||||
if lock_key is not None and len(lock_key) < self.MAX_LOCK_LENGTH:
|
if lock_key is not None and len(lock_key) < self.MAX_LOCK_LENGTH:
|
||||||
lock_id = self.lock_api.create_lock(context, lock_key)
|
lock_id = self.lock_api.create_lock(context, lock_key)
|
||||||
LOG.info("Lock %(lock_id)s acquired for lock_key %(lock_key)s",
|
LOG.debug("Lock %(lock_id)s acquired for lock_key %(lock_key)s",
|
||||||
{'lock_id': lock_id, 'lock_key': lock_key})
|
{'lock_id': lock_id, 'lock_key': lock_key})
|
||||||
else:
|
else:
|
||||||
lock_id = None
|
lock_id = None
|
||||||
LOG.info("No lock for lock_key %s", lock_key)
|
LOG.debug("No lock for lock_key %s", lock_key)
|
||||||
|
|
||||||
return Lock(context, lock_id, lock_key, self.release)
|
return Lock(context, lock_id, lock_key, self.release)
|
||||||
|
|
||||||
@ -109,5 +109,5 @@ class LockEngine(object):
|
|||||||
"""
|
"""
|
||||||
if lock.lock_id is not None:
|
if lock.lock_id is not None:
|
||||||
self.lock_api.delete_lock(lock.context, lock.lock_id)
|
self.lock_api.delete_lock(lock.context, lock.lock_id)
|
||||||
LOG.info("Lock %(lock_id)s released for lock_key %(key)s",
|
LOG.debug("Lock %(lock_id)s released for lock_key %(key)s",
|
||||||
{'lock_id': lock.lock_id, 'key': lock.lock_key})
|
{'lock_id': lock.lock_id, 'key': lock.lock_key})
|
||||||
|
@ -253,6 +253,11 @@ Possible values:
|
|||||||
"""
|
"""
|
||||||
values = self.obj_changes_to_primitive()
|
values = self.obj_changes_to_primitive()
|
||||||
values['type_name'] = self.get_type_name()
|
values['type_name'] = self.get_type_name()
|
||||||
|
|
||||||
|
LOG.debug("Sending request to create artifact of type '%(type_name)s'."
|
||||||
|
" New values are %(values)s",
|
||||||
|
{'type_name': self.get_type_name(), 'values': values})
|
||||||
|
|
||||||
af_vals = self.db_api.save(context, None, values)
|
af_vals = self.db_api.save(context, None, values)
|
||||||
return self.init_artifact(context, af_vals)
|
return self.init_artifact(context, af_vals)
|
||||||
|
|
||||||
@ -262,8 +267,13 @@ Possible values:
|
|||||||
:param context: user context
|
:param context: user context
|
||||||
:return: updated artifact object
|
:return: updated artifact object
|
||||||
"""
|
"""
|
||||||
updated_af = self.db_api.save(context, self.id,
|
values = self.obj_changes_to_primitive()
|
||||||
self.obj_changes_to_primitive())
|
|
||||||
|
LOG.debug("Sending request to update artifact '%(af_id)s'. "
|
||||||
|
"New values are %(values)s",
|
||||||
|
{'af_id': self.id, 'values': values})
|
||||||
|
|
||||||
|
updated_af = self.db_api.save(context, self.id, values)
|
||||||
return self.init_artifact(context, updated_af)
|
return self.init_artifact(context, updated_af)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user