Skip to content

Fix double conversion of datetime for log entries. - #3144

Merged
daspecster merged 3 commits into
googleapis:masterfrom
daspecster:fix-logging-datetime-conversion
Mar 16, 2017
Merged

Fix double conversion of datetime for log entries.#3144
daspecster merged 3 commits into
googleapis:masterfrom
daspecster:fix-logging-datetime-conversion

Conversation

@daspecster

Copy link
Copy Markdown
Contributor

Fixes: #3129

This should fix the double conversion issue.

/cc @waprin

@daspecsterdaspecster added the api: logging Issues related to the Cloud Logging API. label Mar 15, 2017
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 15, 2017
Comment threadlogging/unit_tests/test__gax.py Outdated
'labels': LABELS,
'insertId': IID,
'timestamp': NOW,
'timestamp': NOW.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment threadlogging/unit_tests/test__gax.py Outdated
'labels': LABELS,
'insertId': IID,
'timestamp': NOW,
'timestamp': NOW.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),

This comment was marked as spam.

Comment threadlogging/unit_tests/test_logger.py Outdated
{'textPayload': TEXT, 'insertId': IID1, 'timestamp': TIMESTAMP1},
{'jsonPayload': STRUCT, 'insertId': IID2, 'timestamp': TIMESTAMP2},
{'textPayload': TEXT, 'insertId': IID1,
'timestamp': TIMESTAMP1.strftime("%Y-%m-%dT%H:%M:%S.%fZ")},

This comment was marked as spam.

Comment threadsystem_tests/logging_.py Outdated
entries = _list_entries(logger)
self.assertEqual(len(entries), 1)
self.assertEqual(entries[0].payload, text_payload)
# self.assertEqual(entries[0].timestamp, now)

This comment was marked as spam.

@daspecster

Copy link
Copy Markdown
ContributorAuthor

@tseaver updated!

@daspecster
daspecster merged commit 97379fc into googleapis:masterMar 16, 2017
@daspecster

Copy link
Copy Markdown
ContributorAuthor

Gah..forgot to squash...apologies.

@daspecster
daspecster deleted the fix-logging-datetime-conversion branch March 16, 2017 20:08
@Fkawala

Copy link
Copy Markdown

@daspecster thanks for the swift fix !

@daspecster

Copy link
Copy Markdown
ContributorAuthor

@Fkawala thanks for tracking it down!

richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…me-conversion
Fix double conversion of datetime for log entries.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: loggingIssues related to the Cloud Logging API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug, double conversion.

7 participants

@daspecster@Fkawala@tseaver@lukesneeringer@dhermes@waprin@googlebot