Skip to content

Commit fd4da88

Browse files
authored
chore(migration): Migrate code from googleapis/python-logging into packages/google-cloud-logging (#15591)
See #10909. This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.
2 parents e0426dc + 717c158 commit fd4da88

247 files changed

Lines changed: 85929 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.kokoro/system.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ packages_with_system_tests=(
4848
"google-cloud-bigquery-storage"
4949
"google-cloud-dns"
5050
"google-cloud-error-reporting"
51+
"google-cloud-logging"
5152
"google-cloud-testutils"
5253
)
5354

.librarian/generator-input/client-post-processing/integrate-isolated-handwritten-code.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,20 @@ replacements:
283283
after: |
284284
UNIT_TEST_EXTRAS: List[str] = ["pandas", "storage"]
285285
count: 1
286+
- paths: [
287+
packages/google-cloud-logging/noxfile.py,
288+
]
289+
before: |
290+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List\[str\] = \[\]
291+
after: |
292+
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = [
293+
"google-cloud-bigquery",
294+
"google-cloud-pubsub",
295+
"google-cloud-storage",
296+
"google-cloud-testutils",
297+
"opentelemetry-sdk",
298+
]
299+
count: 1
286300
- paths: [
287301
packages/google-cloud-automl/noxfile.py,
288302
]

.librarian/generator-input/client-post-processing/logging-integration.yaml

Lines changed: 486 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "logging",
3+
"name_pretty": "Cloud Logging API",
4+
"product_documentation": "https://cloud.google.com/logging/docs",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/logging/latest",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559764",
7+
"release_level": "stable",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/google-cloud-python",
11+
"distribution_name": "google-cloud-logging",
12+
"api_id": "logging.googleapis.com",
13+
"codeowner_team": "@googleapis/yoshi-python",
14+
"default_version": "v2",
15+
"api_shortname": "logging",
16+
"api_description": "Writes log entries and manages your Cloud Logging configuration."
17+
}

.librarian/state.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,50 @@ libraries:
20072007
remove_regex:
20082008
- packages/google-cloud-locationfinder/
20092009
tag_format: '{id}-v{version}'
2010+
- id: google-cloud-logging
2011+
version: 3.13.0
2012+
last_generated_commit: 69bf99a9d0910fa86c3c5867ea357aa004dfcc55
2013+
apis:
2014+
- path: google/logging/v2
2015+
service_config: logging_v2.yaml
2016+
source_roots:
2017+
- packages/google-cloud-logging
2018+
preserve_regex:
2019+
- packages/google-cloud-logging/CHANGELOG.md
2020+
- docs/CHANGELOG.md
2021+
remove_regex:
2022+
- ^packages/google-cloud-logging/.coveragerc
2023+
- ^packages/google-cloud-logging/.flake8
2024+
- ^packages/google-cloud-logging/.repo-metadata.json
2025+
- ^packages/google-cloud-logging/LICENSE
2026+
- ^packages/google-cloud-logging/MANIFEST.in
2027+
- ^packages/google-cloud-logging/README.rst
2028+
- ^packages/google-cloud-logging/mypy.ini
2029+
- ^packages/google-cloud-logging/noxfile.py
2030+
- ^packages/google-cloud-logging/setup.py
2031+
- ^packages/google-cloud-logging/docs/conf.py
2032+
- ^packages/google-cloud-logging/docs/index.rst
2033+
- ^packages/google-cloud-logging/docs/multiprocessing.rst
2034+
- ^packages/google-cloud-logging/docs/summary_overview.md
2035+
- ^packages/google-cloud-logging/docs/README.rst
2036+
- ^packages/google-cloud-logging/docs/_static/custom.css
2037+
- ^packages/google-cloud-logging/docs/_templates
2038+
- ^packages/google-cloud-logging/docs/logging_v2
2039+
- ^packages/google-cloud-logging/google/cloud/logging_v2/__init__.py
2040+
- ^packages/google-cloud-logging/google/cloud/logging_v2/services
2041+
- ^packages/google-cloud-logging/google/cloud/logging_v2/types
2042+
- ^packages/google-cloud-logging/google/cloud/logging_v2/gapic_version.py
2043+
- ^packages/google-cloud-logging/google/cloud/logging_v2/gapic_metadata.json
2044+
- ^packages/google-cloud-logging/google/cloud/logging_v2/py.typed
2045+
- ^packages/google-cloud-logging/google/cloud/logging/__init__.py
2046+
- ^packages/google-cloud-logging/google/cloud/logging/gapic_version.py
2047+
- ^packages/google-cloud-logging/google/cloud/logging/py.typed
2048+
- ^packages/google-cloud-logging/samples/generated_samples
2049+
- ^packages/google-cloud-logging/testing
2050+
- ^packages/google-cloud-logging/tests/__init__.py
2051+
- ^packages/google-cloud-logging/tests/unit/__init__.py
2052+
- ^packages/google-cloud-logging/tests/unit/gapic
2053+
tag_format: '{id}-v{version}'
20102054
- id: google-cloud-lustre
20112055
version: 0.3.0
20122056
last_generated_commit: 3322511885371d2b2253f209ccc3aa60d4100cfd
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
show_missing = True
6+
omit =
7+
google/cloud/logging/__init__.py
8+
google/cloud/logging/gapic_version.py
9+
exclude_lines =
10+
# Re-enable the standard pragma
11+
pragma: NO COVER
12+
# Ignore debug-only repr
13+
def __repr__
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
[flake8]
17+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
18+
# Resolve flake8 lint issues
19+
ignore = E203, E231, E266, E501, W503
20+
exclude =
21+
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2333):
22+
# Ensure that generated code passes flake8 lint
23+
**/gapic/**
24+
**/services/**
25+
**/types/**
26+
# Exclude Protobuf gencode
27+
*_pb2.py
28+
29+
# Standard linting exemptions.
30+
**/.nox/**
31+
__pycache__,
32+
.git,
33+
*.pyc,
34+
conf.py
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "logging",
3+
"name_pretty": "Cloud Logging API",
4+
"product_documentation": "https://cloud.google.com/logging/docs",
5+
"client_documentation": "https://cloud.google.com/python/docs/reference/logging/latest",
6+
"issue_tracker": "https://issuetracker.google.com/savedsearches/559764",
7+
"release_level": "stable",
8+
"language": "python",
9+
"library_type": "GAPIC_COMBO",
10+
"repo": "googleapis/google-cloud-python",
11+
"distribution_name": "google-cloud-logging",
12+
"api_id": "logging.googleapis.com",
13+
"codeowner_team": "@googleapis/yoshi-python",
14+
"default_version": "v2",
15+
"api_shortname": "logging",
16+
"api_description": "Writes log entries and manages your Cloud Logging configuration."
17+
}

0 commit comments

Comments
 (0)