google-cloud-logging 3.13.0__tar.gz → 3.15.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google_cloud_logging-3.15.0/PKG-INFO +252 -0
- google_cloud_logging-3.15.0/README.rst +204 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/__init__.py +10 -16
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/gapic_version.py +1 -1
- {google_cloud_logging-3.13.0/google/cloud/logging_v2 → google_cloud_logging-3.15.0/google/cloud/logging}/handlers/__init__.py +5 -3
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/__init__.py +13 -13
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_gapic.py +16 -19
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_helpers.py +7 -8
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_instrumentation.py +2 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/client.py +8 -9
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/entries.py +10 -9
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/gapic_version.py +1 -1
- {google_cloud_logging-3.13.0/google/cloud/logging → google_cloud_logging-3.15.0/google/cloud/logging_v2}/handlers/__init__.py +5 -3
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/handlers.py +6 -8
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/middleware/request.py +0 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/structured_log.py +7 -5
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/sync.py +1 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/logger.py +11 -10
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/async_client.py +52 -33
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/client.py +91 -60
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/pagers.py +16 -15
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/__init__.py +0 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/base.py +23 -13
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/grpc.py +14 -12
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/transports/grpc_asyncio.py +15 -13
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/async_client.py +52 -34
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/client.py +90 -60
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/pagers.py +15 -14
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/__init__.py +0 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +22 -11
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/grpc.py +20 -17
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/transports/grpc_asyncio.py +21 -18
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +50 -31
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/client.py +89 -58
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/pagers.py +8 -7
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py +0 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +22 -11
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc.py +14 -11
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/transports/grpc_asyncio.py +15 -12
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/log_entry.py +6 -8
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging.py +4 -4
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging_config.py +6 -4
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/logging_metrics.py +4 -5
- google_cloud_logging-3.15.0/google_cloud_logging.egg-info/PKG-INFO +252 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/SOURCES.txt +0 -2
- google_cloud_logging-3.15.0/google_cloud_logging.egg-info/requires.txt +16 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/setup.py +18 -14
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/system/gapic/v2/test_system_logging_service_v2_v2.py +21 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/system/test_system.py +65 -39
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_config_service_v2.py +409 -99
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_logging_service_v2.py +395 -86
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/test_metrics_service_v2.py +396 -101
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/__init__.py +0 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/middleware/test_request.py +1 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test__helpers.py +9 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_app_engine.py +49 -33
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_container_engine.py +3 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_handlers.py +12 -10
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test_structured_log.py +20 -18
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_background_thread.py +5 -4
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test__gapic.py +36 -18
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test__helpers.py +1 -4
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test__http.py +11 -12
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test__instrumentation.py +1 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_client.py +24 -21
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_entries.py +26 -21
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_logger.py +31 -18
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_logging_shim.py +1 -2
- google_cloud_logging-3.13.0/PKG-INFO +0 -143
- google_cloud_logging-3.13.0/README.rst +0 -94
- google_cloud_logging-3.13.0/google_cloud_logging.egg-info/PKG-INFO +0 -143
- google_cloud_logging-3.13.0/google_cloud_logging.egg-info/requires.txt +0 -15
- google_cloud_logging-3.13.0/tests/performance/noxfile.py +0 -175
- google_cloud_logging-3.13.0/tests/performance/test_performance.py +0 -348
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/LICENSE +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/MANIFEST.in +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/handlers/middleware/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/handlers/transports/__init__.py +2 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/py.typed +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_http.py +2 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/gapic_metadata.json +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/_helpers.py +1 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/_monitored_resources.py +1 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/app_engine.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/container_engine.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/middleware/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/__init__.py +2 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/background_thread.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/handlers/transports/base.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/metric.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/py.typed +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/resource.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/config_service_v2/__init__.py +1 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/logging_service_v2/__init__.py +1 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/services/metrics_service_v2/__init__.py +1 -1
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/sink.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/types/__init__.py +3 -3
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/dependency_links.txt +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/not-zip-safe +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google_cloud_logging.egg-info/top_level.txt +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/setup.cfg +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/gapic/logging_v2/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/test__monitored_resources.py +9 -9
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/__init__.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_base.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/handlers/transports/test_sync.py +2 -2
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_metric.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_packaging.py +0 -0
- {google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/tests/unit/test_sink.py +0 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: google-cloud-logging
|
|
3
|
+
Version: 3.15.0
|
|
4
|
+
Summary: Google Cloud Logging API client library
|
|
5
|
+
Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging
|
|
6
|
+
Author: Google LLC
|
|
7
|
+
Author-email: googleapis-packages@google.com
|
|
8
|
+
License: Apache 2.0
|
|
9
|
+
Platform: Posix; MacOS X; Windows
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Classifier: Topic :: Internet
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: google-api-core[grpc]<3.0.0,>=2.11.0
|
|
26
|
+
Requires-Dist: google-auth!=2.24.0,!=2.25.0,<3.0.0,>=2.14.1
|
|
27
|
+
Requires-Dist: google-cloud-appengine-logging<2.0.0,>=0.1.3
|
|
28
|
+
Requires-Dist: google-cloud-audit-log<1.0.0,>=0.3.1
|
|
29
|
+
Requires-Dist: google-cloud-core<3.0.0,>=2.0.0
|
|
30
|
+
Requires-Dist: grpc-google-iam-v1<1.0.0,>=0.12.4
|
|
31
|
+
Requires-Dist: opentelemetry-api>=1.9.0
|
|
32
|
+
Requires-Dist: grpcio<2.0.0,>=1.33.2
|
|
33
|
+
Requires-Dist: grpcio<2.0.0,>=1.75.1; python_version >= "3.14"
|
|
34
|
+
Requires-Dist: proto-plus<2.0.0,>=1.22.3
|
|
35
|
+
Requires-Dist: proto-plus<2.0.0,>=1.25.0; python_version >= "3.13"
|
|
36
|
+
Requires-Dist: protobuf<8.0.0,>=4.25.8
|
|
37
|
+
Dynamic: author
|
|
38
|
+
Dynamic: author-email
|
|
39
|
+
Dynamic: classifier
|
|
40
|
+
Dynamic: description
|
|
41
|
+
Dynamic: home-page
|
|
42
|
+
Dynamic: license
|
|
43
|
+
Dynamic: license-file
|
|
44
|
+
Dynamic: platform
|
|
45
|
+
Dynamic: requires-dist
|
|
46
|
+
Dynamic: requires-python
|
|
47
|
+
Dynamic: summary
|
|
48
|
+
|
|
49
|
+
Python Client for Cloud Logging API
|
|
50
|
+
===================================
|
|
51
|
+
|
|
52
|
+
|stable| |pypi| |versions|
|
|
53
|
+
|
|
54
|
+
`Cloud Logging API`_: Writes log entries and manages your Cloud Logging configuration.
|
|
55
|
+
|
|
56
|
+
- `Client Library Documentation`_
|
|
57
|
+
- `Product Documentation`_
|
|
58
|
+
|
|
59
|
+
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
|
|
60
|
+
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
|
|
61
|
+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-logging.svg
|
|
62
|
+
:target: https://pypi.org/project/google-cloud-logging/
|
|
63
|
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-logging.svg
|
|
64
|
+
:target: https://pypi.org/project/google-cloud-logging/
|
|
65
|
+
.. _Cloud Logging API: https://cloud.google.com/logging/docs
|
|
66
|
+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/logging/latest/summary_overview
|
|
67
|
+
.. _Product Documentation: https://cloud.google.com/logging/docs
|
|
68
|
+
|
|
69
|
+
Quick Start
|
|
70
|
+
-----------
|
|
71
|
+
|
|
72
|
+
In order to use this library, you first need to go through the following steps:
|
|
73
|
+
|
|
74
|
+
1. `Select or create a Cloud Platform project.`_
|
|
75
|
+
2. `Enable billing for your project.`_
|
|
76
|
+
3. `Enable the Cloud Logging API.`_
|
|
77
|
+
4. `Set up Authentication.`_
|
|
78
|
+
|
|
79
|
+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
|
|
80
|
+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
|
|
81
|
+
.. _Enable the Cloud Logging API.: https://cloud.google.com/logging/docs
|
|
82
|
+
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
|
|
83
|
+
|
|
84
|
+
For an interactive walkthrough on how to use this library in a python application, click the Guide Me button below:
|
|
85
|
+
|
|
86
|
+
|guide|
|
|
87
|
+
|
|
88
|
+
.. |guide| image:: https://raw.githubusercontent.com/googleapis/google-cloud-python/main/packages/google-cloud-logging/_static/guide-me.png
|
|
89
|
+
:target: https://console.cloud.google.com/?walkthrough_id=logging__logging-python
|
|
90
|
+
|
|
91
|
+
Installation
|
|
92
|
+
~~~~~~~~~~~~
|
|
93
|
+
|
|
94
|
+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
|
|
95
|
+
creates isolated Python environments. These isolated environments can have separate
|
|
96
|
+
versions of Python packages, which allows you to isolate one project's dependencies
|
|
97
|
+
from the dependencies of other projects.
|
|
98
|
+
|
|
99
|
+
With `venv`_, it's possible to install this library without needing system
|
|
100
|
+
install permissions, and without clashing with the installed system
|
|
101
|
+
dependencies.
|
|
102
|
+
|
|
103
|
+
.. _`venv`: https://docs.python.org/3/library/venv.html
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
Code samples and snippets
|
|
107
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
108
|
+
|
|
109
|
+
Code samples and snippets live in the `samples/`_ folder.
|
|
110
|
+
|
|
111
|
+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging/samples
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Supported Python Versions
|
|
115
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
116
|
+
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
117
|
+
Python.
|
|
118
|
+
|
|
119
|
+
Python >= 3.9, including 3.14
|
|
120
|
+
|
|
121
|
+
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
122
|
+
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
123
|
+
|
|
124
|
+
Unsupported Python Versions
|
|
125
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
126
|
+
Python <= 3.8
|
|
127
|
+
|
|
128
|
+
If you are using an `end-of-life`_
|
|
129
|
+
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
130
|
+
|
|
131
|
+
.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
|
|
132
|
+
|
|
133
|
+
Mac/Linux
|
|
134
|
+
^^^^^^^^^
|
|
135
|
+
|
|
136
|
+
.. code-block:: console
|
|
137
|
+
|
|
138
|
+
python3 -m venv <your-env>
|
|
139
|
+
source <your-env>/bin/activate
|
|
140
|
+
pip install google-cloud-logging
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
Windows
|
|
144
|
+
^^^^^^^
|
|
145
|
+
|
|
146
|
+
.. code-block:: console
|
|
147
|
+
|
|
148
|
+
py -m venv <your-env>
|
|
149
|
+
.\<your-env>\Scripts\activate
|
|
150
|
+
pip install google-cloud-logging
|
|
151
|
+
|
|
152
|
+
Next Steps
|
|
153
|
+
~~~~~~~~~~
|
|
154
|
+
|
|
155
|
+
- Read the `Client Library Documentation`_ for Cloud Logging API
|
|
156
|
+
to see other available methods on the client.
|
|
157
|
+
- Read the `Cloud Logging API Product documentation`_ to learn
|
|
158
|
+
more about the product and see How-to Guides.
|
|
159
|
+
- View this `README`_ to see the full list of Cloud
|
|
160
|
+
APIs that we cover.
|
|
161
|
+
|
|
162
|
+
.. _Cloud Logging API Product documentation: https://cloud.google.com/logging/docs
|
|
163
|
+
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
|
|
164
|
+
|
|
165
|
+
Logging
|
|
166
|
+
-------
|
|
167
|
+
|
|
168
|
+
This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
|
|
169
|
+
Note the following:
|
|
170
|
+
|
|
171
|
+
#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging.
|
|
172
|
+
#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
|
|
173
|
+
#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
|
|
174
|
+
|
|
175
|
+
Simple, environment-based configuration
|
|
176
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
177
|
+
|
|
178
|
+
To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google
|
|
179
|
+
logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged
|
|
180
|
+
messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
|
|
181
|
+
event.
|
|
182
|
+
|
|
183
|
+
A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
|
|
184
|
+
|
|
185
|
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
|
|
186
|
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
|
|
187
|
+
|
|
188
|
+
**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
|
|
189
|
+
|
|
190
|
+
Environment-Based Examples
|
|
191
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
192
|
+
|
|
193
|
+
- Enabling the default handler for all Google-based loggers
|
|
194
|
+
|
|
195
|
+
.. code-block:: console
|
|
196
|
+
|
|
197
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
|
|
198
|
+
|
|
199
|
+
- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
200
|
+
|
|
201
|
+
.. code-block:: console
|
|
202
|
+
|
|
203
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
Advanced, code-based configuration
|
|
207
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
208
|
+
|
|
209
|
+
You can also configure a valid logging scope using Python's standard `logging` mechanism.
|
|
210
|
+
|
|
211
|
+
Code-Based Examples
|
|
212
|
+
^^^^^^^^^^^^^^^^^^^
|
|
213
|
+
|
|
214
|
+
- Configuring a handler for all Google-based loggers
|
|
215
|
+
|
|
216
|
+
.. code-block:: python
|
|
217
|
+
|
|
218
|
+
import logging
|
|
219
|
+
|
|
220
|
+
from google.cloud import library_v1
|
|
221
|
+
|
|
222
|
+
base_logger = logging.getLogger("google")
|
|
223
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
224
|
+
base_logger.setLevel(logging.DEBUG)
|
|
225
|
+
|
|
226
|
+
- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
227
|
+
|
|
228
|
+
.. code-block:: python
|
|
229
|
+
|
|
230
|
+
import logging
|
|
231
|
+
|
|
232
|
+
from google.cloud import library_v1
|
|
233
|
+
|
|
234
|
+
base_logger = logging.getLogger("google.cloud.library_v1")
|
|
235
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
236
|
+
base_logger.setLevel(logging.DEBUG)
|
|
237
|
+
|
|
238
|
+
Logging details
|
|
239
|
+
~~~~~~~~~~~~~~~
|
|
240
|
+
|
|
241
|
+
#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root
|
|
242
|
+
logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
|
|
243
|
+
:code:`logging.getLogger("google").propagate = True` in your code.
|
|
244
|
+
#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
|
|
245
|
+
one library, but decide you need to also set up environment-based logging configuration for another library.
|
|
246
|
+
|
|
247
|
+
#. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
|
|
248
|
+
if the code -based configuration gets applied first.
|
|
249
|
+
|
|
250
|
+
#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
|
|
251
|
+
executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
|
|
252
|
+
(This is the reason for 2.i. above.)
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Python Client for Cloud Logging API
|
|
2
|
+
===================================
|
|
3
|
+
|
|
4
|
+
|stable| |pypi| |versions|
|
|
5
|
+
|
|
6
|
+
`Cloud Logging API`_: Writes log entries and manages your Cloud Logging configuration.
|
|
7
|
+
|
|
8
|
+
- `Client Library Documentation`_
|
|
9
|
+
- `Product Documentation`_
|
|
10
|
+
|
|
11
|
+
.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg
|
|
12
|
+
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels
|
|
13
|
+
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-logging.svg
|
|
14
|
+
:target: https://pypi.org/project/google-cloud-logging/
|
|
15
|
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-logging.svg
|
|
16
|
+
:target: https://pypi.org/project/google-cloud-logging/
|
|
17
|
+
.. _Cloud Logging API: https://cloud.google.com/logging/docs
|
|
18
|
+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/logging/latest/summary_overview
|
|
19
|
+
.. _Product Documentation: https://cloud.google.com/logging/docs
|
|
20
|
+
|
|
21
|
+
Quick Start
|
|
22
|
+
-----------
|
|
23
|
+
|
|
24
|
+
In order to use this library, you first need to go through the following steps:
|
|
25
|
+
|
|
26
|
+
1. `Select or create a Cloud Platform project.`_
|
|
27
|
+
2. `Enable billing for your project.`_
|
|
28
|
+
3. `Enable the Cloud Logging API.`_
|
|
29
|
+
4. `Set up Authentication.`_
|
|
30
|
+
|
|
31
|
+
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
|
|
32
|
+
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
|
|
33
|
+
.. _Enable the Cloud Logging API.: https://cloud.google.com/logging/docs
|
|
34
|
+
.. _Set up Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
|
|
35
|
+
|
|
36
|
+
For an interactive walkthrough on how to use this library in a python application, click the Guide Me button below:
|
|
37
|
+
|
|
38
|
+
|guide|
|
|
39
|
+
|
|
40
|
+
.. |guide| image:: https://raw.githubusercontent.com/googleapis/google-cloud-python/main/packages/google-cloud-logging/_static/guide-me.png
|
|
41
|
+
:target: https://console.cloud.google.com/?walkthrough_id=logging__logging-python
|
|
42
|
+
|
|
43
|
+
Installation
|
|
44
|
+
~~~~~~~~~~~~
|
|
45
|
+
|
|
46
|
+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
|
|
47
|
+
creates isolated Python environments. These isolated environments can have separate
|
|
48
|
+
versions of Python packages, which allows you to isolate one project's dependencies
|
|
49
|
+
from the dependencies of other projects.
|
|
50
|
+
|
|
51
|
+
With `venv`_, it's possible to install this library without needing system
|
|
52
|
+
install permissions, and without clashing with the installed system
|
|
53
|
+
dependencies.
|
|
54
|
+
|
|
55
|
+
.. _`venv`: https://docs.python.org/3/library/venv.html
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
Code samples and snippets
|
|
59
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
60
|
+
|
|
61
|
+
Code samples and snippets live in the `samples/`_ folder.
|
|
62
|
+
|
|
63
|
+
.. _samples/: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-logging/samples
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Supported Python Versions
|
|
67
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
68
|
+
Our client libraries are compatible with all current `active`_ and `maintenance`_ versions of
|
|
69
|
+
Python.
|
|
70
|
+
|
|
71
|
+
Python >= 3.9, including 3.14
|
|
72
|
+
|
|
73
|
+
.. _active: https://devguide.python.org/devcycle/#in-development-main-branch
|
|
74
|
+
.. _maintenance: https://devguide.python.org/devcycle/#maintenance-branches
|
|
75
|
+
|
|
76
|
+
Unsupported Python Versions
|
|
77
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
78
|
+
Python <= 3.8
|
|
79
|
+
|
|
80
|
+
If you are using an `end-of-life`_
|
|
81
|
+
version of Python, we recommend that you update as soon as possible to an actively supported version.
|
|
82
|
+
|
|
83
|
+
.. _end-of-life: https://devguide.python.org/devcycle/#end-of-life-branches
|
|
84
|
+
|
|
85
|
+
Mac/Linux
|
|
86
|
+
^^^^^^^^^
|
|
87
|
+
|
|
88
|
+
.. code-block:: console
|
|
89
|
+
|
|
90
|
+
python3 -m venv <your-env>
|
|
91
|
+
source <your-env>/bin/activate
|
|
92
|
+
pip install google-cloud-logging
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
Windows
|
|
96
|
+
^^^^^^^
|
|
97
|
+
|
|
98
|
+
.. code-block:: console
|
|
99
|
+
|
|
100
|
+
py -m venv <your-env>
|
|
101
|
+
.\<your-env>\Scripts\activate
|
|
102
|
+
pip install google-cloud-logging
|
|
103
|
+
|
|
104
|
+
Next Steps
|
|
105
|
+
~~~~~~~~~~
|
|
106
|
+
|
|
107
|
+
- Read the `Client Library Documentation`_ for Cloud Logging API
|
|
108
|
+
to see other available methods on the client.
|
|
109
|
+
- Read the `Cloud Logging API Product documentation`_ to learn
|
|
110
|
+
more about the product and see How-to Guides.
|
|
111
|
+
- View this `README`_ to see the full list of Cloud
|
|
112
|
+
APIs that we cover.
|
|
113
|
+
|
|
114
|
+
.. _Cloud Logging API Product documentation: https://cloud.google.com/logging/docs
|
|
115
|
+
.. _README: https://github.com/googleapis/google-cloud-python/blob/main/README.rst
|
|
116
|
+
|
|
117
|
+
Logging
|
|
118
|
+
-------
|
|
119
|
+
|
|
120
|
+
This library uses the standard Python :code:`logging` functionality to log some RPC events that could be of interest for debugging and monitoring purposes.
|
|
121
|
+
Note the following:
|
|
122
|
+
|
|
123
|
+
#. Logs may contain sensitive information. Take care to **restrict access to the logs** if they are saved, whether it be on local storage or on Google Cloud Logging.
|
|
124
|
+
#. Google may refine the occurrence, level, and content of various log messages in this library without flagging such changes as breaking. **Do not depend on immutability of the logging events**.
|
|
125
|
+
#. By default, the logging events from this library are not handled. You must **explicitly configure log handling** using one of the mechanisms below.
|
|
126
|
+
|
|
127
|
+
Simple, environment-based configuration
|
|
128
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
129
|
+
|
|
130
|
+
To enable logging for this library without any changes in your code, set the :code:`GOOGLE_SDK_PYTHON_LOGGING_SCOPE` environment variable to a valid Google
|
|
131
|
+
logging scope. This configures handling of logging events (at level :code:`logging.DEBUG` or higher) from this library in a default manner, emitting the logged
|
|
132
|
+
messages in a structured format. It does not currently allow customizing the logging levels captured nor the handlers, formatters, etc. used for any logging
|
|
133
|
+
event.
|
|
134
|
+
|
|
135
|
+
A logging scope is a period-separated namespace that begins with :code:`google`, identifying the Python module or package to log.
|
|
136
|
+
|
|
137
|
+
- Valid logging scopes: :code:`google`, :code:`google.cloud.asset.v1`, :code:`google.api`, :code:`google.auth`, etc.
|
|
138
|
+
- Invalid logging scopes: :code:`foo`, :code:`123`, etc.
|
|
139
|
+
|
|
140
|
+
**NOTE**: If the logging scope is invalid, the library does not set up any logging handlers.
|
|
141
|
+
|
|
142
|
+
Environment-Based Examples
|
|
143
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
144
|
+
|
|
145
|
+
- Enabling the default handler for all Google-based loggers
|
|
146
|
+
|
|
147
|
+
.. code-block:: console
|
|
148
|
+
|
|
149
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google
|
|
150
|
+
|
|
151
|
+
- Enabling the default handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
152
|
+
|
|
153
|
+
.. code-block:: console
|
|
154
|
+
|
|
155
|
+
export GOOGLE_SDK_PYTHON_LOGGING_SCOPE=google.cloud.library_v1
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Advanced, code-based configuration
|
|
159
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
160
|
+
|
|
161
|
+
You can also configure a valid logging scope using Python's standard `logging` mechanism.
|
|
162
|
+
|
|
163
|
+
Code-Based Examples
|
|
164
|
+
^^^^^^^^^^^^^^^^^^^
|
|
165
|
+
|
|
166
|
+
- Configuring a handler for all Google-based loggers
|
|
167
|
+
|
|
168
|
+
.. code-block:: python
|
|
169
|
+
|
|
170
|
+
import logging
|
|
171
|
+
|
|
172
|
+
from google.cloud import library_v1
|
|
173
|
+
|
|
174
|
+
base_logger = logging.getLogger("google")
|
|
175
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
176
|
+
base_logger.setLevel(logging.DEBUG)
|
|
177
|
+
|
|
178
|
+
- Configuring a handler for a specific Google module (for a client library called :code:`library_v1`):
|
|
179
|
+
|
|
180
|
+
.. code-block:: python
|
|
181
|
+
|
|
182
|
+
import logging
|
|
183
|
+
|
|
184
|
+
from google.cloud import library_v1
|
|
185
|
+
|
|
186
|
+
base_logger = logging.getLogger("google.cloud.library_v1")
|
|
187
|
+
base_logger.addHandler(logging.StreamHandler())
|
|
188
|
+
base_logger.setLevel(logging.DEBUG)
|
|
189
|
+
|
|
190
|
+
Logging details
|
|
191
|
+
~~~~~~~~~~~~~~~
|
|
192
|
+
|
|
193
|
+
#. Regardless of which of the mechanisms above you use to configure logging for this library, by default logging events are not propagated up to the root
|
|
194
|
+
logger from the `google`-level logger. If you need the events to be propagated to the root logger, you must explicitly set
|
|
195
|
+
:code:`logging.getLogger("google").propagate = True` in your code.
|
|
196
|
+
#. You can mix the different logging configurations above for different Google modules. For example, you may want use a code-based logging configuration for
|
|
197
|
+
one library, but decide you need to also set up environment-based logging configuration for another library.
|
|
198
|
+
|
|
199
|
+
#. If you attempt to use both code-based and environment-based configuration for the same module, the environment-based configuration will be ineffectual
|
|
200
|
+
if the code -based configuration gets applied first.
|
|
201
|
+
|
|
202
|
+
#. The Google-specific logging configurations (default handlers for environment-based configuration; not propagating logging events to the root logger) get
|
|
203
|
+
executed the first time *any* client library is instantiated in your application, and only if the affected loggers have not been previously configured.
|
|
204
|
+
(This is the reason for 2.i. above.)
|
{google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging/__init__.py
RENAMED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
# Copyright 2020 Google LLC
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
4
3
|
#
|
|
5
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
# you may not use this file except in compliance with the License.
|
|
@@ -14,24 +13,19 @@
|
|
|
14
13
|
# See the License for the specific language governing permissions and
|
|
15
14
|
# limitations under the License.
|
|
16
15
|
#
|
|
17
|
-
|
|
18
|
-
from google.cloud.logging_v2 import __version__
|
|
19
|
-
from google.cloud.logging_v2 import ASCENDING
|
|
20
|
-
from google.cloud.logging_v2 import DESCENDING
|
|
21
|
-
|
|
16
|
+
from google.cloud.logging_v2 import ASCENDING, DESCENDING, __version__, handlers, types
|
|
22
17
|
from google.cloud.logging_v2.client import Client
|
|
23
|
-
from google.cloud.logging_v2.entries import
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
from google.cloud.logging_v2.logger import Batch
|
|
18
|
+
from google.cloud.logging_v2.entries import (
|
|
19
|
+
LogEntry,
|
|
20
|
+
ProtobufEntry,
|
|
21
|
+
StructEntry,
|
|
22
|
+
TextEntry,
|
|
23
|
+
logger_name_from_path,
|
|
24
|
+
)
|
|
25
|
+
from google.cloud.logging_v2.logger import Batch, Logger
|
|
31
26
|
from google.cloud.logging_v2.metric import Metric
|
|
32
27
|
from google.cloud.logging_v2.resource import Resource
|
|
33
28
|
from google.cloud.logging_v2.sink import Sink
|
|
34
|
-
from google.cloud.logging_v2 import types
|
|
35
29
|
|
|
36
30
|
__all__ = (
|
|
37
31
|
"__version__",
|
|
@@ -16,10 +16,12 @@
|
|
|
16
16
|
|
|
17
17
|
from google.cloud.logging_v2.handlers.app_engine import AppEngineHandler
|
|
18
18
|
from google.cloud.logging_v2.handlers.container_engine import ContainerEngineHandler
|
|
19
|
+
from google.cloud.logging_v2.handlers.handlers import (
|
|
20
|
+
CloudLoggingFilter,
|
|
21
|
+
CloudLoggingHandler,
|
|
22
|
+
setup_logging,
|
|
23
|
+
)
|
|
19
24
|
from google.cloud.logging_v2.handlers.structured_log import StructuredLogHandler
|
|
20
|
-
from google.cloud.logging_v2.handlers.handlers import CloudLoggingHandler
|
|
21
|
-
from google.cloud.logging_v2.handlers.handlers import CloudLoggingFilter
|
|
22
|
-
from google.cloud.logging_v2.handlers.handlers import setup_logging
|
|
23
25
|
|
|
24
26
|
__all__ = [
|
|
25
27
|
"AppEngineHandler",
|
{google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/__init__.py
RENAMED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2025 Google LLC
|
|
2
3
|
#
|
|
3
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
5
|
# you may not use this file except in compliance with the License.
|
|
5
6
|
# You may obtain a copy of the License at
|
|
6
7
|
#
|
|
7
|
-
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
9
|
#
|
|
9
10
|
# Unless required by applicable law or agreed to in writing, software
|
|
10
11
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
12
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
13
|
# See the License for the specific language governing permissions and
|
|
13
14
|
# limitations under the License.
|
|
14
|
-
|
|
15
|
+
#
|
|
15
16
|
from __future__ import absolute_import
|
|
16
17
|
|
|
17
18
|
from google.cloud.logging_v2 import gapic_version as package_version
|
|
18
19
|
|
|
19
20
|
__version__ = package_version.__version__
|
|
20
21
|
|
|
22
|
+
from google.cloud.logging_v2 import handlers, types
|
|
21
23
|
from google.cloud.logging_v2.client import Client
|
|
22
|
-
from google.cloud.logging_v2.entries import
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
from google.cloud.logging_v2.logger import Batch
|
|
24
|
+
from google.cloud.logging_v2.entries import (
|
|
25
|
+
LogEntry,
|
|
26
|
+
ProtobufEntry,
|
|
27
|
+
StructEntry,
|
|
28
|
+
TextEntry,
|
|
29
|
+
logger_name_from_path,
|
|
30
|
+
)
|
|
31
|
+
from google.cloud.logging_v2.logger import Batch, Logger
|
|
30
32
|
from google.cloud.logging_v2.metric import Metric
|
|
31
33
|
from google.cloud.logging_v2.resource import Resource
|
|
32
34
|
from google.cloud.logging_v2.sink import Sink
|
|
33
|
-
from google.cloud.logging_v2 import types
|
|
34
|
-
|
|
35
35
|
|
|
36
36
|
ASCENDING = "timestamp asc"
|
|
37
37
|
"""Query string to order by ascending timestamps."""
|
{google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_gapic.py
RENAMED
|
@@ -15,29 +15,26 @@
|
|
|
15
15
|
"""Wrapper for adapting the autogenerated gapic client to the hand-written
|
|
16
16
|
client."""
|
|
17
17
|
|
|
18
|
+
from google.api_core import client_info, gapic_v1
|
|
19
|
+
from google.protobuf.json_format import MessageToDict, ParseDict, ParseError
|
|
20
|
+
|
|
21
|
+
from google.cloud.logging_v2._helpers import entry_from_resource
|
|
22
|
+
from google.cloud.logging_v2.metric import Metric
|
|
18
23
|
from google.cloud.logging_v2.services.config_service_v2 import ConfigServiceV2Client
|
|
19
24
|
from google.cloud.logging_v2.services.logging_service_v2 import LoggingServiceV2Client
|
|
20
25
|
from google.cloud.logging_v2.services.metrics_service_v2 import MetricsServiceV2Client
|
|
21
|
-
from google.cloud.logging_v2.types import CreateSinkRequest
|
|
22
|
-
from google.cloud.logging_v2.types import UpdateSinkRequest
|
|
23
|
-
from google.cloud.logging_v2.types import ListSinksRequest
|
|
24
|
-
from google.cloud.logging_v2.types import ListLogMetricsRequest
|
|
25
|
-
from google.cloud.logging_v2.types import ListLogEntriesRequest
|
|
26
|
-
from google.cloud.logging_v2.types import WriteLogEntriesRequest
|
|
27
|
-
from google.cloud.logging_v2.types import LogSink
|
|
28
|
-
from google.cloud.logging_v2.types import LogMetric
|
|
29
|
-
from google.cloud.logging_v2.types import LogEntry as LogEntryPB
|
|
30
|
-
|
|
31
|
-
from google.protobuf.json_format import MessageToDict
|
|
32
|
-
from google.protobuf.json_format import ParseDict
|
|
33
|
-
from google.protobuf.json_format import ParseError
|
|
34
|
-
|
|
35
|
-
from google.cloud.logging_v2._helpers import entry_from_resource
|
|
36
26
|
from google.cloud.logging_v2.sink import Sink
|
|
37
|
-
from google.cloud.logging_v2.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
from google.cloud.logging_v2.types import (
|
|
28
|
+
CreateSinkRequest,
|
|
29
|
+
ListLogEntriesRequest,
|
|
30
|
+
ListLogMetricsRequest,
|
|
31
|
+
ListSinksRequest,
|
|
32
|
+
LogMetric,
|
|
33
|
+
LogSink,
|
|
34
|
+
UpdateSinkRequest,
|
|
35
|
+
WriteLogEntriesRequest,
|
|
36
|
+
)
|
|
37
|
+
from google.cloud.logging_v2.types import LogEntry as LogEntryPB
|
|
41
38
|
|
|
42
39
|
|
|
43
40
|
class _LoggingAPI(object):
|
{google_cloud_logging-3.13.0 → google_cloud_logging-3.15.0}/google/cloud/logging_v2/_helpers.py
RENAMED
|
@@ -15,17 +15,16 @@
|
|
|
15
15
|
"""Common logging helpers."""
|
|
16
16
|
|
|
17
17
|
import logging
|
|
18
|
-
|
|
19
|
-
from datetime import datetime
|
|
20
|
-
from datetime import timedelta
|
|
21
|
-
from datetime import timezone
|
|
18
|
+
from datetime import datetime, timedelta, timezone
|
|
22
19
|
|
|
23
20
|
import requests
|
|
24
21
|
|
|
25
|
-
from google.cloud.logging_v2.entries import
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
from google.cloud.logging_v2.entries import (
|
|
23
|
+
LogEntry,
|
|
24
|
+
ProtobufEntry,
|
|
25
|
+
StructEntry,
|
|
26
|
+
TextEntry,
|
|
27
|
+
)
|
|
29
28
|
|
|
30
29
|
try:
|
|
31
30
|
from google.cloud.logging_v2.types import LogSeverity
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
15
|
"""Add diagnostic instrumentation source information to logs"""
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
from google.cloud.logging_v2 import __version__
|
|
18
|
+
from google.cloud.logging_v2.entries import StructEntry
|
|
18
19
|
|
|
19
20
|
_DIAGNOSTIC_INFO_KEY = "logging.googleapis.com/diagnostic"
|
|
20
21
|
_INSTRUMENTATION_SOURCE_KEY = "instrumentation_source"
|