You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use StructuredLogHandler directly to ensure printing to stdout regardless of location, especially locally. I want my project Id to be automatically inferred so the trace ID includes my project ID ("logging.googleapis.com/trace": "projects/PROJECT_ID/traces/abcdef",).
Neither locally or remotely, will the project id be set automatically:
I want to use StructuredLogHandler directly to ensure printing to stdout regardless of location, especially locally. I want my project Id to be automatically inferred so the trace ID includes my project ID (
"logging.googleapis.com/trace": "projects/PROJECT_ID/traces/abcdef",).Neither locally or remotely, will the project id be set automatically:
The solution is to set the project ID:
Or use CloudLoggingHandler (note this doesn't print to stdout unless env vars are set):