-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
When using the Python Stackdriver Logging API, there is not a well-defined way to specify where you want your logs to land. All of them will go into Custom Logs. The way around this is to use a Logging Handler, but this is not well written anywhere except for this one particular blog post:
https://medium.com/google-cloud/cloud-logging-though-a-python-log-handler-a3fbeaf14704#.39a97qpib
The reason it cannot be done through the standard API is because this line
overwrites whatever resource you would rather write to. No parameter I could find (or the Google engineer I asked) would set the resource in order to change the destination of the logs. The closest we could find is here:
but this is set by the previous line stated above. Changing this resource manually is a pretty important feature to us that we are surprised is not already there.