fix(model/log): log exception on swallowed db errors
This commit is contained in:
parent
625bd66b42
commit
ea740d15ba
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ def log_action(kind_name, user_or_organization_name, performer=None, repository=
|
||||||
datetime=timestamp)
|
datetime=timestamp)
|
||||||
except PeeweeException as ex:
|
except PeeweeException as ex:
|
||||||
if kind_name is 'pull_repo' and config.app_config.get('ALLOW_PULLS_WITHOUT_STRICT_LOGGING'):
|
if kind_name is 'pull_repo' and config.app_config.get('ALLOW_PULLS_WITHOUT_STRICT_LOGGING'):
|
||||||
logger.warning('log_action failed',
|
logger.exception('log_action failed',
|
||||||
extra={'exception': ex, 'action_kind': kind, 'account': account,
|
extra={'exception': ex, 'action_kind': kind, 'account': account,
|
||||||
'performer': performer, 'repository': repository, 'ip': ip,
|
'performer': performer, 'repository': repository, 'ip': ip,
|
||||||
'metadata_json': metadata_json, 'datetime': timestamp})
|
'metadata_json': metadata_json, 'datetime': timestamp})
|
||||||
|
|
Reference in a new issue