Skip to content

Commit

Permalink
Fix incorrect 'structPayload' entry in 'Batch.commit'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Mar 28, 2016
1 parent 7aa9629 commit 43a0936
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gcloud/logging/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def commit(self, client=None):
if entry_type == 'text':
info = {'textPayload': entry}
elif entry_type == 'struct':
info = {'structPayload': entry}
info = {'jsonPayload': entry}
elif entry_type == 'proto':
as_json_str = MessageToJson(entry)
as_json = json.loads(as_json_str)
Expand Down
6 changes: 3 additions & 3 deletions gcloud/logging/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def test_commit_w_bound_client(self):
},
'entries': [
{'textPayload': TEXT},
{'structPayload': STRUCT},
{'jsonPayload': STRUCT},
{'protoPayload': json.loads(MessageToJson(message))},
],
}
Expand Down Expand Up @@ -522,7 +522,7 @@ def test_commit_w_alternate_client(self):
'labels': DEFAULT_LABELS,
'entries': [
{'textPayload': TEXT, 'labels': LABELS},
{'structPayload': STRUCT},
{'jsonPayload': STRUCT},
{'protoPayload': json.loads(MessageToJson(message))},
],
}
Expand Down Expand Up @@ -560,7 +560,7 @@ def test_context_mgr_success(self):
'labels': DEFAULT_LABELS,
'entries': [
{'textPayload': TEXT},
{'structPayload': STRUCT, 'labels': LABELS},
{'jsonPayload': STRUCT, 'labels': LABELS},
{'protoPayload': json.loads(MessageToJson(message))},
],
}
Expand Down

0 comments on commit 43a0936

Please sign in to comment.