werkzeug logs are filtered out by default #713
Labels
api: logging
Issues related to the googleapis/python-logging API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
OS type and version: Google Cloud Container Optimized OS (gke-12314-gke401-cos-93-16623-295-14-v221129-c-pre)
Python version: 3.8.10
pip version: 22.3.1
google-cloud-logging
version: 3.4.0Steps to reproduce
Code example
This results in
hello from werkzeug
not being set to theglobal
log.Due to
EXCLUDED_LOGGER_DEFAULTS
werkzeug is excluded from the set of loggers that are sent to Google Cloud logging:python-logging/google/cloud/logging_v2/handlers/handlers.py
Lines 27 to 33 in fceb6f3
google.cloud.logging.Client.setup_logging()
has anexcluded_loggers
kwarg but setting that does not change the set of loggers that are ignored by the library due to the default set being added back into the set of ignored loggers inpython-logging/google/cloud/logging_v2/handlers/handlers.py
Line 294 in fceb6f3
The only workaround is to patch
EXCLUDED_LOGGER_DEFAULTS
to removewerkzeug
from the list.The text was updated successfully, but these errors were encountered: