logging: automatic project detection in logging.NewClient() #7321
Labels
api: logging
Issues related to the Cloud Logging API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
When calling
logging.NewClient()
, the caller has to specify the parent which is assumed to be a project ID if its type is not explicit.When running in GCE, GCR, GCF or GAE Standard, the obvious default choice for parent would be the same project in which the code runs. At the same time, in those environments, the project ID can be inferred from the environment (see logging/resource.go).
Describe the solution you'd like
Allow
which will set the parent to the project ID in which the code is running.
Describe alternatives you've considered
Callers of the logging library implement their own automatic project ID detection.
Additional context
N/A
The text was updated successfully, but these errors were encountered: