As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Changelog

PyPI History

3.11.3 (2024-10-15)

Bug Fixes

  • 16-bit hexadecimal formatting for XCTC span IDs (#946) (1f2b190)

3.11.2 (2024-08-15)

Bug Fixes

  • deps: Require google-cloud-appengine-logging>=0.1.3 (550abca)

  • deps: Require google-cloud-audit-log >= 0.2.4 (550abca)

  • deps: Require opentelemetry-api>=1.9.0 (550abca)

  • Fixed type hinting issue with specifying Transport class (#930) (e2875d6)

3.11.1 (2024-08-06)

Bug Fixes

3.11.0 (2024-07-15)

Features

  • OpenTelemetry trace/spanID integration for Python handlers (#889) (78168a3)

Bug Fixes

  • Added environment specific labels to client library when running in Cloud Run Jobs (#877) (9c5e8f0)

  • Added missing import into logger.py (#896) (9ca242d)

  • Added type hints to CloudLoggingHandler constructor (#903) (6959345)

Documentation

  • Add summary_overview template (#878) (b60714c)

  • Changed table in web-framework-integration to bulleted list (#875) (a4aa3a7)

  • Documentation update for OpenTelemetry (#915) (2a0539a)

  • Update dictConfig snippet (#885) (6264107)

3.10.0 (2024-03-13)

Features

  • Allow users to explicitly configure universe domain (#846) (e998a21)

Bug Fixes

  • Added placeholder kwargs to StructuredLogHandler (#845) (9bc0a37)

  • Allowed for a partial override of loggers that get excluded from setup_client (#831) (870c940)

  • Remove usage in including_default_value_fields to prepare for protobuf 5.x (#866) (66a534d)

  • Use value of cluster-location in GKE for tagging location (#830) (c15847c)

Documentation

  • Added documentation for Django/Flask integrations and dictConfig (#848) (c65ec92)

3.9.0 (2023-12-08)

Features

  • Add support for Python 3.12 (#813) (6591b53)

  • Use native namespaces instead of pkg_resources (#812) (10ad75d)

Bug Fixes

  • Fixed DeprecationWarning for datetime objects for Python 3.12 (#824) (2384981)

  • Fixed object paths in autogenerated code in owlbot.py (#804) (b14bb14)

  • Updated protobuf JSON formatting to support nested protobufs (#797) (a00c261)

  • Use retry_async instead of retry in async client (#816) (c79f7f5)

  • Use warning instead of warn in system tests to avoid DeprecationWarning (#821) (c447175)

3.8.0 (2023-10-03)

Features

  • Add cloud_run_job monitored resource type. (#788) (3b310d6)

3.7.0 (2023-09-25)

Features

  • Add ConfigServiceV2.CreateBucketAsync method for creating Log Buckets asynchronously (30f24a8)

  • Add ConfigServiceV2.CreateLink method for creating linked datasets for Log Analytics Buckets (30f24a8)

  • Add ConfigServiceV2.DeleteLink method for deleting linked datasets (30f24a8)

  • Add ConfigServiceV2.GetLink methods for describing linked datasets (30f24a8)

  • Add ConfigServiceV2.ListLinks method for listing linked datasets (30f24a8)

  • Add ConfigServiceV2.UpdateBucketAsync method for creating Log Buckets asynchronously (30f24a8)

  • Add LogBucket.analytics_enabled field that specifies whether Log Bucket’s Analytics features are enabled (30f24a8)

  • Add LogBucket.index_configs field that contains a list of Log Bucket’s indexed fields and related configuration data (30f24a8)

  • Log Analytics features of the Cloud Logging API (30f24a8)

Bug Fixes

  • Add async context manager return types (30f24a8)

  • Add severity to structured log write (#783) (31a7f69)

  • Handle exceptions raised when fetching Django request data (#758) (5ecf886)

  • Unintended exception omittion (#736) (022dc54)

Documentation

  • Documentation for the Log Analytics features of the Cloud Logging API (30f24a8)

  • Minor formatting (30f24a8)

3.6.0 (2023-07-05)

Features

  • Add logic to convert severity string to uppercase (#744) (c1c8ce1)

Bug Fixes

  • Properly handle None from metadata server (#718) (dedaff9)

Documentation

  • Fix formatting of request arg in docstring (#734) (dbb1794)

3.5.0 (2023-01-24)

Features

  • Add support for Python 3.11 (412d481)

Bug Fixes

  • Add context manager return types (e2278c1)

  • Instrumentation entries should not contain user labels (#703) (e05d132)

  • Require proto-plus 1.22.2 for Python 3.11 (412d481)

  • Send StructuredLogHandler instrumentation log using an explicit logger (#705) (ac6a2c6)

Documentation

  • Add documentation for enums (e2278c1)

3.4.0 (2022-12-15)

Features

  • Add typing to proto.Message based class attributes (9d505f1)

Bug Fixes

  • Add dict typing for client_options (9d505f1)

  • deps: Require google-api-core >=1.34.0, >=2.11.0 (9d505f1)

  • Drop usage of pkg_resources (9d505f1)

  • Fix timeout default values (9d505f1)

Documentation

  • samples: Snippetgen handling of repeated enum field (9d505f1)

  • samples: Snippetgen should call await on the operation coroutine before calling result (9d505f1)

3.3.1 (2022-12-05)

Bug Fixes

3.3.0 (2022-11-26)

Features

  • Add support to custom JSON encoders (#657) (77e621c)

  • Include context on batch log errors (#650) (d08be9a)

  • Set partial_success to default to true for batched logs (#649) (e56d3e8)

  • Support Django asgi middleware (#625) (f52b3aa)

Bug Fixes

  • deps: Allow protobuf 3.19.5 (#644) (12f3001)

  • Json fields dictionary has modification side effect (#654) (a62a0d6)

3.2.4 (2022-10-04)

Bug Fixes

3.2.3 (2022-09-30)

Bug Fixes

  • Mimic the pubsub test to clean up bigquery datasets (#639) (44deb1b)

  • Nested json with structured log handler (#636) (b840435)

  • Structured log handler drops reserved fields in json_fields (#634) (4ef38b3)

3.2.2 (2022-08-12)

Bug Fixes

  • deps: allow protobuf < 5.0.0 (#600) (8495dac)

  • deps: require proto-plus >= 1.22.0 (8495dac)

3.2.1 (2022-07-13)

Bug Fixes

  • deps: require google-api-core>=1.32.0,>=2.8.0 (#585) (de35eab)

3.2.0 (2022-07-11)

Features

  • add audience parameter (a2eed8c)

  • Add support for library instrumentation (#551) (8ba0023)

Bug Fixes

  • deps: require google-api-core >= 2.8.0 (#575) (a2eed8c)

  • deps: require google-cloud-core >= 2.0.0 (a2eed8c)

  • require python 3.7+ (#580) (0b3eb52)

3.1.2 (2022-06-03)

Bug Fixes

Documentation

  • fix changelog header to consistent size (#562) (3f16107)

  • Update README image to absolute URL, fix PyPI rendering (#561) (76413b1)

3.1.1 (2022-05-23)

Documentation

  • Change button in README to .png file (#554) (e297747)

3.1.0 (2022-05-08)

Features

  • KMS configuration in settings (#489) (6699f8c)

  • Update Logging API with latest changes (6699f8c)

Bug Fixes

  • deps: require google-api-core>=1.31.5, >=2.3.2 (#494) (ab14563)

  • fix system test for mtls (#485) (96bb6f7)

  • Reenable staleness bot (#535) (1595e42)

  • remove unnecessary detect_resource calls from CloudLoggingHandler (#484) (def7440)

  • resolve DuplicateCredentialArgs error when using credentials_file (265061e)

Dependencies

Documentation

3.0.0 (2022-01-27)

⚠ BREAKING CHANGES

  • make logging API more friendly to use (#422)

  • api consistency between HTTP and Gapic layers (#375)

  • support string-encoded json (#339)

  • Infer default resource in logger (#315)

  • support json logs (#316)

  • deprecate AppEngineHandler and ContainerEngineHandler (#310)

Features

Bug Fixes

  • allow reading logs from non-project paths (#444) (97e32b6)

  • api consistency between HTTP and Gapic layers (#375) (e1506fa)

Miscellaneous Chores

  • deprecate AppEngineHandler and ContainerEngineHandler (#310) (e3cac88)

Documentation

2.7.0 (2021-11-02)

Features

  • add context manager support in client (#415) (f5af164)

  • added support for iam AuditData proto (#396) (e3a1eba)

  • use structured logging on GCF with python 3.7 (#434) (5055919)

Bug Fixes

  • add ‘dict’ annotation type to ‘request’ (76ac729)

  • add ‘dict’ annotation type to ‘request’ (23f9e1f)

  • deps: drop packaging dependency (9d38995)

  • deps: require google-api-core >= 1.28.0 (9d38995)

  • deps: require proto-plus==1.15.0 (76ac729)

  • exception log message format (#394) (c426bf5)

  • improper types in pagers generation (76ac729)

  • improper types in pagers generation (6a837a5)

Documentation

  • list oneofs in docstring (9d38995)

2.6.0 (2021-07-28)

Features

Bug Fixes

  • deps: pin ‘google-{api,cloud}-core’, ‘google-auth’ to allow 2.x versions (#356) (a970dd2)

  • disable always_use_jwt_access (#342) (a95e401)

  • enable self signed jwt for grpc (#360) (707fad1)

Documentation

2.5.0 (2021-06-10)

Features

  • support AuditLog and RequestLog protos (#274) (5d91be9)

Bug Fixes

2.4.0 (2021-05-12)

Features

Bug Fixes

  • changed region format on serverless (#291) (8872d6f)

  • changed region format on serverless (#291) (360d3d2)

  • deps: fix minimum required version of google-api-core (#244) (874fdfa)

  • deps: fix minimum required version of google-api-core (#244) (37d33fc)

  • improve API compatibility for next release (#292) (1f9517d)

  • remove noisy logs (#290) (bdf8273)

2.3.1 (2021-03-24)

Bug Fixes

  • detect project from environment instead of from logger (#238) (813b97c)

  • revert default resource behavior to avoid breaking changes (#237) (24a0a5e)

2.3.0 (2021-03-15)

Features

  • Add json setting to allow unicodes to show in log instead of ascii ch… (#193) (e8c8e30)

  • detect monitored resources on all GCP environments (#200) (4eda681)

Bug Fixes

Documentation

  • add python std_logging to sample browser (#173) (7cc7275)

2.2.0 (2021-01-27)

Features

  • add ‘from_service_account_info’ factory to clients (a9ff2b7)

Bug Fixes

2.1.1 (2021-01-14)

Bug Fixes

2.1.0 (2021-01-12)

Features

  • allow modifying LogEntry data using extra argument (#129) (92b287f)

  • support http_request field (#120) (ba94afb)

Bug Fixes

  • add InternalServerError to list of expected errors (#151) (9bf49f5)

Documentation

2.0.2 (2020-12-14)

Bug Fixes

  • Add submodule imports for handlers to logging alias (#117) (6843a3a)

  • remove client recv msg limit fix: add enums to types/__init__.py (#131) (6349b89)

  • Remove keyword only argument for RequestsMiddleware (#113) (e704f28)

2.0.1 (2020-12-02)

Bug Fixes

Documentation

2.0.0 (2020-11-19)

⚠ BREAKING CHANGES

  • Use microgenerator for GAPIC layer. See UPGRADING.md for details. (#94)

  • removes support for webapp2 and other Python2 specific code

Features

Bug Fixes

Code Refactoring

Documentation

1.15.1 (2020-07-01)

Documentation

  • add initialization of LogEntry instance in the v2 example (#46) (251ac93), closes #44

  • change descriptions for virtual environment (#48) (c5c3c15), closes #47

1.15.0 (2020-02-26)

Features

  • add support for cmek settings; undeprecate resource name helper methods; bump copyright year to 2020 (#22) (1c687c1)

Bug Fixes

  • logging: deprecate resource name helper methods (via synth) (#9837) (335af9e)

  • logging: update test assertion and core version pins (#10087) (4aedea8)

  • replace unsafe six.PY3 with PY2 for better future compatibility with Python 4 (#10081) (c6eb601)

1.14.0

10-15-2019 06:50 PDT

Implementation Changes

  • Fix proto copy. (#9420)

Dependencies

  • Pin ‘google-cloud-core >= 1.0.3, < 2.0.0dev’. (#9445)

1.13.0

09-23-2019 10:00 PDT

Implementation Changes

  • Pass ‘stream’ argument to super in ‘ContainerEngineHandler.init’. (#9166)

New Features

  • Add LoggingV2Servicer, LogSinks, logging_metrics, and log_entry. Add LogSeverity and HttpRequest types (via synth). (#9262)

  • Add client_options to logging v1 (#9046)

Documentation

  • Remove compatability badges from READMEs. (#9035)

Internal / Testing Changes

  • Docs: Remove CI for gh-pages, use googleapis.dev for api_core refs. (#9085)

  • Delete custom synth removing gRPC send/recv msg size limits. (#8939)

1.12.1

08-01-2019 09:45 PDT

Implementation Changes

  • Remove gRPC size restrictions (4MB default) (#8860)

  • Map stdlib loglevels to Cloud Logging severity enum values. (#8837)

Documentation

  • Fix ‘list_entries’ example with projects. (#8858)

Internal / Testing Changes

  • Update intersphinx mapping for requests. (#8805)

1.12.0

07-24-2019 16:47 PDT

Implementation Changes

  • Set the ‘timestamp’ on log records created by handler. (#8227)

  • Clarify worker thread implementation. (#8228)

New Features

  • Add path-construction helpers to GAPIC clients (via synth). (#8631)

  • Add ‘client_options’ support, update list method docstrings (via synth). (#8535)

Dependencies

  • Bump minimum version for google-api-core to 1.14.0. (#8709)

Documentation

  • Link to googleapis.dev documentation in READMEs. (#8705)

  • Add compatibility check badges to READMEs. (#8288)

Internal / Testing Changes

  • Re-add “generated” markers (via synth). (#8538)

  • Add nox session ‘docs’ to remaining manual clients. (#8478)

  • Add docs job to publish to googleapis.dev. (#8464)

  • Fix tests broken in PR #8227. (#8273)

  • Add empty lines. (#8064)

  • Use alabaster theme everwhere. (#8021)

1.11.0

05-16-2019 12:27 PDT

Implementation Changes

  • Add routing header to method metadata (via synth). (#7598)

  • Remove classifier for Python 3.4 for end-of-life. (#7535)

  • Use FQDN for GCE metadata endpoint. (#7520)

New Features

  • Add client_info support to client. (#7874) and (#7901)

Dependencies

  • Pin google-cloud-core >= 1.0.0, < 2.0dev. (#7993)

Documentation

  • Update client library documentation URLs. (#7307)

  • Reformat snippet (via synth). (#7216)

  • Add snippet for logging a resource. (#7212)

Internal / Testing Changes

  • Reorder methods in file (via synth). (#7810)

  • Copy lintified proto files (via synth). (#7450)

  • Trivial gapic-generator change. (#7230)

  • Add protos as an artifact to library (#7205)

1.10.0

01-17-2019 15:37 PST

Implementation Changes

  • Change WriteLogEntries retry policy.

  • Protoc-generated serialization update. (#7088)

  • GAPIC generation fixes. (#7061)

Internal / Testing Changes

  • Update copyright headers.

  • Use ‘python-3.6’ for ‘blacken’ run. (#7064)

1.9.1

12-17-2018 16:49 PST

Implementation Changes

  • Allow setting name, args on default handler (post-blacken) (#6828)

Documentation

  • Document Python 2 deprecation (#6910)

  • Normalize docs for page_size / max_results / page_token. (#6842)

1.9.0

12-10-2018 12:55 PST

Implementation Changes

  • Import iam.policy from google.api_core. (#6741)

  • Pick up fixes to GAPIC generator. (#6631)

  • Fix client_info bug, update docstrings via synth. (#6435)

  • Revert “Allow turning on JSON Detection in StackDriver” (#6352)

  • Allow turning on JSON Detection in StackDriver (#6293)

New Features

  • Add support for additional ‘LogEntry’ fields (#6229)

Dependencies

  • Update dependency to google-cloud-core (#6835)

  • Bump minimum api_core version for all GAPIC libs to 1.4.1. (#6391)

Internal / Testing Changes

  • Change the url to the canonical one (#6843)

  • Omit local deps (#6701)

  • Run black at end of synth.py (#6698)

  • Blackening Continued… (#6667)

  • Add templates for flake8, coveragerc, noxfile, and black. (#6642)

  • Logging: add ‘synth.py’. (#6081)

1.8.0

10-17-2018 14:23 PDT

Implementation Changes

  • Logging: allow more tries on inner retry for ‘_list_entries’. (#6179)

  • Accommodate payload-less log entries. (#6103)

New Features

  • Logging: support request-correlated logging in App Engine standard python37 runtime (#6118)

Documentation

  • Logging: fix class reference in docstring (#6153)

  • Translate / Logging / Language: restore detailed usage docs. (#5999)

  • Redirect renamed ‘usage.html’/’client.html’ -> ‘index.html’. (#5996)

Internal / Testing Changes

  • Use new Nox (#6175)

  • Logging: harden systest teardown against ‘DeadlineExceeded’ retry errors. (#6182)

  • Logging: fix lint errors. (#6183)

  • Harden sink / metric creation against transient errors. (#6180)

  • Logging: test both GCLOUD_PROJECT and GOOGLE_CLOUD_PROJECT env vars (#6138)

  • Harden ‘test_list_entry_with_unregistered’ against 429 errors. (#6181)

  • Prep logging docs for repo split. (#5943)

1.7.0

Implementation Changes

  • Print to stderr instead of stdout when exiting the program (#5569)

  • Avoid overwriting ‘module’ of messages from shared modules. (#5364)

  • Support older Django versions in request middleware #5024

  • Fix bad trove classifier #5386

New Features

  • Add support for trace and span_id to logging async API (#5908)

  • Add support for span_id attribute of log entries (#5885)

  • Add support for trace attribute of log entries (#5878)

  • Add support for Python 3.7 and remove 3.4 (#5295)

Documentation

  • Replace links to ‘/stable/’ with ‘/latest/’. (#5901)

Internal / Testing Changes

  • Nox: use inplace installs (#5865)

  • Unflake logging systests (#5698)

  • Harden _list_entries system test further against backoff failure. (#5551)

  • Harden logging systests (#5496)

  • Harden system tests against ‘ResourceExhausted’ quota errors. (#5486)

  • Modify system tests to use prerelease versions of grpcio (#5304)

  • Plug leaky sink in systests. (#5247)

1.6.0

Dependencies

  • The minimum version for google-api-core has been updated to version 1.0.0. This may cause some incompatibility with older google-cloud libraries, you will need to update those libraries if you have a dependency conflict. (#4944, #4946)

Testing and internal changes

  • Install local dependencies when running lint (#4936)

  • Re-enable lint for tests, remove usage of pylint (#4921)

  • Normalize all setup.py files (#4909)

1.5.0

New features

  • Added max_latency to BackgroundThreadTransport. (#4762)

  • Added support for unique writer identity in Sink. (#4595, #4708, #4704, #4706)

Implementation changes

  • The underlying auto-generated client library was re-generated to pick up new features and bugfixes. (#4759)

  • Moved the code path of get_gae_labels() to emit(). (#4824)

  • Removed a debug print statement. (#4838)

  • LogSink.create captures the server-generated writerIdentity. (#4707)

  • Accomodated a back-end change making Sink.filter optional. (#4699)

Testing

  • Fixed system tests (#4768)

  • Hardened test for retrieve_metadata_server against transparent DNS proxies. (#4698)

  • Added cleanup for Pub / Sub topic in logging system test. (#4532)

  • Added another check for Python 2.7 in Logging nox -s default. (#4523)

  • Pinned django test dependency to < 2.0 in Python 2.7. (#4519)

  • Maked a nox -s default session for all packages. (#4324)

  • Shortened test names. (#4321)

Documentation

  • Added doc to highlight missing uniqueWriterIdentity field. (#4579)

  • Fixing “Fore” -> “For” typo in README docs. (#4317)

1.4.0

Implementation Changes

  • Remove deepcopy of Client._http in background transport (#3954)

Documentation

  • Added link to “Python Development Environment Setup Guide” in project README (#4187, h/t to @michaelawyu)

Dependencies

  • Upgrading to google-cloud-core >= 0.28.0 and adding dependency on google-api-core (#4221, #4280)

  • Deferring to google-api-core for grpcio and googleapis-common-protos dependencies (#4096, #4098)

PyPI: https://pypi.org/project/google-cloud-logging/1.4.0/