diff options
author | Bruno Wagner <bwagner@riseup.net> | 2016-01-13 16:57:50 -0200 |
---|---|---|
committer | Bruno Wagner <bwagner@riseup.net> | 2016-01-13 16:57:50 -0200 |
commit | e84b13eb3821a497eac6fdec3ad7644495a2ab58 (patch) | |
tree | 3aba8ecd1f343549aed86290dfb2c172aa69cea1 /service/pixelated/resources | |
parent | 8046a75c14778cff19c0543b2df9b70d1a168e3f (diff) |
Changed attachment error print with a logger
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r-- | service/pixelated/resources/attachments_resource.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py index fc3efee7..09715282 100644 --- a/service/pixelated/resources/attachments_resource.py +++ b/service/pixelated/resources/attachments_resource.py @@ -16,6 +16,7 @@ import cgi import io import re +import logging from twisted.internet import defer from twisted.protocols.basic import FileSender @@ -26,6 +27,8 @@ from twisted.web.server import NOT_DONE_YET from pixelated.resources import respond_json_deferred +logger = logging.getLogger(__name__) + class AttachmentResource(Resource): isLeaf = True @@ -95,7 +98,7 @@ class AttachmentsResource(Resource): respond_json_deferred(response_json, request, status_code=201) def error_handler(error): - print error + logger.error(error) respond_json_deferred({"message": "Something went wrong. Attachment not saved."}, request, status_code=500) deferred.addCallback(send_location) |