Skip to content

Commit

Permalink
Merge pull request #1 from GetWellNetwork/fix-logging
Browse files Browse the repository at this point in the history
use proper logger message formatting
  • Loading branch information
jochenvdv authored Jul 8, 2019
2 parents e79a577 + fc1bc0d commit 1608d00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flask_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __call__(self, event, context):
return super(FlaskLambda, self).__call__(event, context)

self.logger.debug('Called with AWS Lambda input event')
self.logger.debug('Event: ', event)
self.logger.debug('Event: %r', event)

response = LambdaResponse()

Expand All @@ -134,8 +134,8 @@ def __call__(self, event, context):
'body': body.decode('utf-8')
}

except Exception as e:
self.logger.error('An unexpected exception occured: ', e)
except:
self.logger.exception('An unexpected exception occured')

return {
'statusCode': 500,
Expand Down

0 comments on commit 1608d00

Please sign in to comment.