I'm working on a simple Google Cloud Function that runs in the Python runtime and I want some simple logging from the Python program to Stackdriver Logging.
Based on Google's startup guide, this should be straighforward https://cloud.google.com/logging/docs/setup/python
I set up a simple test function to isolate the logging issues I'm seeing
import google.cloud.logging
def logging_test_background(data, context):
logging_client = google.cloud.logging.Client()
logging_client.setup_logging()
logging.info("This should be info")
logging.debug("This should be debug")
logging.warning("This should be warning")
logging.error("This should be error")
In Stackdriver Logging everything gets jumbled. 1. Info is duplicated as an Error 2. Debug doesn't come through 3. Warning is duplicated, but both are error logging level 4. Error is duplicated
Is there something I'm missing in the configuration?