Skip to content

Options for configuring 'LogSink.destination'. #1591

@tseaver

Description

@tseaver

When I drafted the logging usage doc, I assumed that users would want to pass in a string identifying the bucket, bigquery dataset, or pubsub topic, to which log entries would be exported, and I guessed at three properties, storage_bucket, bigquery_dataset, and pubsub_topic, which would consume and validate those strings.

Now, while working on the implementation, I believe that it might be better to have a destination property, whose setter would be willing to take any of:

  • a string (it would do no validation, but just store it).
  • a Bucket instance
  • a Dataset instance
  • a Topic instance.

In the case of the last three, the destination property setter would synthesize the appropriate destination string and store it.

We would then be able to accept a destination argument to Sink.__init__ and Client.sink, which would just rely on the destination property setter.

Thoughts?

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions