Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow logging unicode text #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions gcm/gcm.py
Expand Up @@ -300,7 +300,7 @@ def make_request(self, data, is_json=True, session=None):
GCM.log('Request headers: {0}', headers)
GCM.log('Request proxy: {0}', self.proxy)
GCM.log('Request timeout: {0}', self.timeout)
GCM.log('Request data: {0}', data)
GCM.log(u'Request data: {0}', data)
GCM.log('Request is_json: {0}', is_json)

new_session = None
Expand All @@ -318,7 +318,7 @@ def make_request(self, data, is_json=True, session=None):

GCM.log('Response status: {0} {1}', response.status_code, response.reason)
GCM.log('Response headers: {0}', response.headers)
GCM.log('Response data: {0}', response.text)
GCM.log(u'Response data: {0}', response.text)

# 5xx or 200 + error:Unavailable
self.retry_after = get_retry_after(response.headers)
Expand All @@ -330,7 +330,7 @@ def make_request(self, data, is_json=True, session=None):
response = response.json()
except:
GCM.log('Response headers: {0}', response.headers)
GCM.log('Response data: {0}', response.text)
GCM.log(u'Response data: {0}', response.text)
else:
response = response.content
return response
Expand Down