Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added documentation for Django/Flask integrations and dictConfig #848

Merged
merged 7 commits into from
Feb 14, 2024
Prev Previous commit
Next Next commit
Added client setup in sample + link to settings in documentation
  • Loading branch information
gkevinzheng committed Feb 13, 2024
commit 322c26cbbdc1c06f5075537343968cb39672a74d
2 changes: 1 addition & 1 deletion docs/web-framework-integration.rst
Expand Up @@ -11,7 +11,7 @@ Django

Django integration has been tested to work with each of the Django/Python versions listed `here <https://docs.djangoproject.com/en/5.0/faq/install/#what-python-version-can-i-use-with-django>`_.
gkevinzheng marked this conversation as resolved.
Show resolved Hide resolved
To enable Django integration, add `google.cloud.logging_v2.handlers.middleware.RequestMiddleware` to the list of `MIDDLEWARE`
in your settings file. Also be sure to :doc:`set up logging </std-lib-integration>` in your settings file.
in your `settings <https://docs.djangoproject.com/en/5.0/topics/settings/>`_ file. Also be sure to :doc:`set up logging </std-lib-integration>` in your settings file.

Flask
-----
Expand Down
4 changes: 4 additions & 0 deletions samples/snippets/usage_guide.py
Expand Up @@ -489,6 +489,10 @@ def logging_dict_config(client):
import logging.config

# [START logging_dict_config]
import google.cloud.logging

client = google.cloud.logging.Client()

LOGGING = {
"version": 1,
"handlers": {
Expand Down