For an interactive walkthrough on how to use this library in a python application, click the Guide Me button below:
Installation
Install this library in a venv using pip. venv is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.
With venv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.
Supported Python Versions
Python >= 3.7
Unsupported Python Versions
Python == 2.7. The last version of the library compatible with Python 2.7 is google-cloud-logging==1.15.1.Python == 3.6. The last version of the library compatible with Python 3.6 is google-cloud-logging==3.1.2.#### Mac/Linux
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [3.12.1 (latest)](/python/docs/reference/logging/latest)\n- [3.12.0](/python/docs/reference/logging/3.12.0)\n- [3.11.3](/python/docs/reference/logging/3.11.3)\n- [3.10.0](/python/docs/reference/logging/3.10.0)\n- [3.9.0](/python/docs/reference/logging/3.9.0)\n- [3.8.0](/python/docs/reference/logging/3.8.0)\n- [3.7.0](/python/docs/reference/logging/3.7.0)\n- [3.6.0](/python/docs/reference/logging/3.6.0)\n- [3.5.0](/python/docs/reference/logging/3.5.0)\n- [3.4.0](/python/docs/reference/logging/3.4.0)\n- [3.3.1](/python/docs/reference/logging/3.3.1)\n- [3.2.5](/python/docs/reference/logging/3.2.5)\n- [3.1.2](/python/docs/reference/logging/3.1.2)\n- [3.0.0](/python/docs/reference/logging/3.0.0)\n- [2.7.2](/python/docs/reference/logging/2.7.2)\n- [2.6.0](/python/docs/reference/logging/2.6.0)\n- [2.5.0](/python/docs/reference/logging/2.5.0)\n- [2.4.0](/python/docs/reference/logging/2.4.0)\n- [2.3.1](/python/docs/reference/logging/2.3.1)\n- [2.2.0](/python/docs/reference/logging/2.2.0)\n- [2.1.1](/python/docs/reference/logging/2.1.1)\n- [2.0.2](/python/docs/reference/logging/2.0.2)\n- [1.15.3](/python/docs/reference/logging/1.15.3)\n- [1.14.0](/python/docs/reference/logging/1.14.0)\n- [1.13.0](/python/docs/reference/logging/1.13.0)\n- [1.12.1](/python/docs/reference/logging/1.12.1) \n\nPython Client for Cloud Logging\n===============================\n\n[](https://pypi.org/project/google-cloud-logging/) [](https://pypi.org/project/google-cloud-logging/)\n\n[Cloud Logging API](https://cloud.google.com/logging): Writes log entries and manages your Cloud\nLogging configuration.\n\n- [Client Library Documentation](https://cloud.google.com/python/docs/reference/logging/latest/summary_overview)\n\n- [Product Documentation](https://cloud.google.com/logging/docs)\n\nQuick Start\n-----------\n\nIn order to use this library, you first need to go through the following steps:\n\n1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)\n\n2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)\n\n3. [Enable the Cloud Logging API.](https://cloud.google.com/logging)\n\n4. [Setup Authentication.](https://googleapis.dev/python/google-api-core/latest/auth.html)\n\nFor an interactive walkthrough on how to use this library in a python application, click the Guide Me button below:\n\n[](https://console.cloud.google.com/?walkthrough_id=logging__logging-python)\n\n### Installation\n\nInstall this library in a [venv](https://docs.python.org/3/library/venv.html) using pip. [venv](https://docs.python.org/3/library/venv.html) is a tool to\ncreate isolated Python environments. The basic problem it addresses is one of\ndependencies and versions, and indirectly permissions.\n\nWith [venv](https://docs.python.org/3/library/venv.html), it's possible to install this library without needing system\ninstall permissions, and without clashing with the installed system\ndependencies.\n\n#### Supported Python Versions\n\nPython \\\u003e= 3.7\n\n#### Unsupported Python Versions\n\nPython == 2.7. The last version of the library compatible with Python 2.7 is `google-cloud-logging==1.15.1`.Python == 3.6. The last version of the library compatible with Python 3.6 is `google-cloud-logging==3.1.2`.#### Mac/Linux \n\n python -m venv \u003cyour-env\u003e\n source \u003cyour-env\u003e/bin/activate\n \u003cyour-env\u003e/bin/pip install google-cloud-logging\n\n#### Windows\n\n python -m venv \u003cyour-env\u003e\n \u003cyour-env\u003e\\Scripts\\activate\n \u003cyour-env\u003e\\Scripts\\pip.exe install google-cloud-logging\n\n### Next Steps\n\n- Read the [Setting Up Cloud Logging for Python](https://cloud.google.com/logging/docs/setup/python) How-to Guide\n\n- Read the [Product documentation](https://cloud.google.com/logging/docs) to learn more about the product and see\n other How-to Guides.\n\n- Read the [Client Library Documentation](https://cloud.google.com/python/docs/reference/logging/latest/summary_overview) for to see other available\n methods on the client."]]