fix(model/log): log exception on swallowed db errors

This commit is contained in:
EvB 2017-03-07 13:16:34 -05:00
parent 625bd66b42
commit ea740d15ba

View file

@ -118,7 +118,7 @@ def log_action(kind_name, user_or_organization_name, performer=None, repository=
datetime=timestamp)
except PeeweeException as ex:
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,
'performer': performer, 'repository': repository, 'ip': ip,
'metadata_json': metadata_json, 'datetime': timestamp})