Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 7f2a08d

Browse files
authored
Merge branch 'main' into owl-bot-copy
2 parents 6d9207a + f4fb25a commit 7f2a08d

7 files changed

Lines changed: 41 additions & 7 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.11.4"
2+
".": "3.12.1"
33
}

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,35 @@
44

55
[1]: https://pypi.org/project/google-cloud-logging/#history
66

7+
## [3.12.1](https://github.com/googleapis/python-logging/compare/v3.12.0...v3.12.1) (2025-04-21)
8+
9+
10+
### Bug Fixes
11+
12+
* Make logging handler close conditional to having the transport opened ([#990](https://github.com/googleapis/python-logging/issues/990)) ([66c6b91](https://github.com/googleapis/python-logging/commit/66c6b91725eb479a0af138a2be13f3c25f369d7e))
13+
14+
## [3.12.0](https://github.com/googleapis/python-logging/compare/v3.11.4...v3.12.0) (2025-04-10)
15+
16+
17+
### Features
18+
19+
* Add REST Interceptors which support reading metadata ([681bcc5](https://github.com/googleapis/python-logging/commit/681bcc5c1f983bb5a43e1d5ebcdb14e5e3f25a77))
20+
* Add support for opt-in debug logging ([681bcc5](https://github.com/googleapis/python-logging/commit/681bcc5c1f983bb5a43e1d5ebcdb14e5e3f25a77))
21+
* Added flushes/close functionality to logging handlers ([#917](https://github.com/googleapis/python-logging/issues/917)) ([d179304](https://github.com/googleapis/python-logging/commit/d179304b344277e349456f72cd90c56f28011286))
22+
23+
24+
### Bug Fixes
25+
26+
* Allow protobuf 6.x ([#977](https://github.com/googleapis/python-logging/issues/977)) ([6757890](https://github.com/googleapis/python-logging/commit/675789001344fdae68ee20ec14e14c11c83a0433))
27+
* **deps:** Require google-cloud-audit-log >= 0.3.1 ([#979](https://github.com/googleapis/python-logging/issues/979)) ([1cc00ec](https://github.com/googleapis/python-logging/commit/1cc00ecf646a7a36eb32afd2e5df3d9aa7f564b1))
28+
* Fix typing issue with gRPC metadata when key ends in -bin ([681bcc5](https://github.com/googleapis/python-logging/commit/681bcc5c1f983bb5a43e1d5ebcdb14e5e3f25a77))
29+
30+
31+
### Documentation
32+
33+
* Added documentation on log_level and excluded_loggers params in setup_logging ([#971](https://github.com/googleapis/python-logging/issues/971)) ([70d9d25](https://github.com/googleapis/python-logging/commit/70d9d25bf8c3c85a3c5523ecc7fbdbf72f08c583))
34+
* Update README to break infinite redirect loop ([#972](https://github.com/googleapis/python-logging/issues/972)) ([52cd907](https://github.com/googleapis/python-logging/commit/52cd907bb313df2766ec11e3d24c7e10cda31ca7))
35+
736
## [3.11.4](https://github.com/googleapis/python-logging/compare/v3.11.3...v3.11.4) (2025-01-22)
837

938

google/cloud/logging/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.11.4" # {x-release-please-version}
16+
__version__ = "3.12.1" # {x-release-please-version}

google/cloud/logging_v2/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "3.11.4" # {x-release-please-version}
16+
__version__ = "3.12.1" # {x-release-please-version}

google/cloud/logging_v2/handlers/handlers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,10 @@ def flush(self):
245245

246246
def close(self):
247247
"""Closes the log handler and cleans up all Transport objects used."""
248-
self.transport.close()
249-
self.transport = None
250-
self._transport_open = False
248+
if self._transport_open:
249+
self.transport.close()
250+
self.transport = None
251+
self._transport_open = False
251252

252253

253254
def _format_and_parse_message(record, formatter_handler):

samples/generated_samples/snippet_metadata_google.logging.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-logging",
11-
"version": "0.1.0"
11+
"version": "3.12.1"
1212
},
1313
"snippets": [
1414
{

tests/unit/handlers/test_handlers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,10 @@ def test_close(self):
901901
self.assertFalse(handler._transport_open)
902902
self.assertTrue(old_transport.close_called)
903903

904+
# second call to close shouldn't throw an exception
905+
handler.close()
906+
self.assertFalse(handler._transport_open)
907+
904908

905909
class TestFormatAndParseMessage(unittest.TestCase):
906910
def test_none(self):

0 commit comments

Comments
 (0)