- Notifications
You must be signed in to change notification settings - Fork 39
Closed
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
LogEntry.StructuredLogFormatter.toStructuredJsonString
is writing to the wrong time field (or writing the wrong data to it).
The spec states we should use:
timestamp
with a structure of epochseconds
andnanos
, ortime
with RFC3339 time.
Currently LogEntry.StructuredLogFormatter.toStructuredJsonString
is writing RFC3339 time to the timestamp
field.
This breaks our parser for our test harness. I'm not sure if it works in all GCP properties which use this format. (Generally the behavior of logging parsers is to fall back to current time, so I would be unsurprised if this is silently failing down to slightly less accurate timestamps in places.)
I'll send a PR.
Metadata
Metadata
Assignees
Labels
api: loggingIssues related to the googleapis/java-logging API.Issues related to the googleapis/java-logging API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.