Skip to content

remove newlines from datastore Key.toString() values #1112

Description

@mattnworb

Calling .toString() on a datastore Key, for instance when logging some value or operation in application code, returns a String containing newlines and tabs, which might be too verbose in places where each "log line" is expected to be a single line.

For instance:

partition_id {
  project_id: "some-project-id"
}
path {
  kind: "taskqueue"
  id: -1037827333
}

Since the toString implemented in BaseKey is converting the instance to protobuf and calling toString on the returned GeneratedMessage, could one of the protobuf methods for formatting without newlines be used instead for condensed output?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions