Commit daab29e5 authored by Łukasz Nowak's avatar Łukasz Nowak

Log errors on ERROR level.

parent afa9fa85
...@@ -34,7 +34,7 @@ from AccessControl import ClassSecurityInfo, getSecurityManager ...@@ -34,7 +34,7 @@ from AccessControl import ClassSecurityInfo, getSecurityManager
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from ComputedAttribute import ComputedAttribute from ComputedAttribute import ComputedAttribute
from zLOG import LOG, INFO from zLOG import LOG, ERROR
import json import json
import transaction import transaction
...@@ -96,7 +96,7 @@ class InstancePublisher(GenericPublisher): ...@@ -96,7 +96,7 @@ class InstancePublisher(GenericPublisher):
person = self.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue() person = self.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()
if person is None: if person is None:
transaction.abort() transaction.abort()
LOG('VifibRestApiV1Tool', INFO, LOG('VifibRestApiV1Tool', ERROR,
'Currenty logged in user %r has no Person document.'% 'Currenty logged in user %r has no Person document.'%
self.getPortalObject().getAuthenticatedMember()) self.getPortalObject().getAuthenticatedMember())
response.setStatus(500) response.setStatus(500)
...@@ -129,7 +129,7 @@ class InstancePublisher(GenericPublisher): ...@@ -129,7 +129,7 @@ class InstancePublisher(GenericPublisher):
person.requestSoftwareInstance(**request_dict) person.requestSoftwareInstance(**request_dict)
except Exception: except Exception:
transaction.abort() transaction.abort()
LOG('VifibRestApiV1Tool', INFO, 'Problem with request.', LOG('VifibRestApiV1Tool', ERROR, 'Problem with request.',
error=True) error=True)
response.setStatus(500) response.setStatus(500)
response.setBody(json.dumps({'error': response.setBody(json.dumps({'error':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment