-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Migrate java logging logback #11857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
chingor13
wants to merge
1,549
commits into
main
Choose a base branch
from
migrate-java-logging-logback
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Migrate java logging logback #11857
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: cindy-peng <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
… dependency upgrade in renovate (#1922) (#1266) Source-Link: googleapis/synthtool@ee0deda Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1fb09a3eb66af09221da69087fd1b4d075bc7c79e508d0708f5dc0f842069da2 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…32.0 (#1271) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.32.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.truth:truth](https://togithub.com/google/truth) | `1.3.0` -> `1.4.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>google/truth (com.google.truth:truth)</summary> ### [`v1.4.0`](https://togithub.com/google/truth/releases/tag/v1.4.0): 1.4.0 In this release, our assertions on Java 8 types continue to move from the `Truth8` class to the main `Truth` class. This change should not break compatibility for any supported JDK or Android version, even users who test under old versions of Android without [API desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring). Additionally, we will never break binary compatibility, though some users will have to make changes to their source code in order for it to compile against newer versions. This release is likely to lead to more **build failures** than [1.3.0](https://togithub.com/google/truth/releases/tag/v1.3.0) did. However, those failures should be **straightforward to fix**. #### Example build failure Foo.java:152: error: reference to assertThat is ambiguous assertThat(repo.findFileWithName("foo")).isNull(); ^ both method assertThat(@​org.jspecify.nullness.Nullable Path) in Truth8 and method assertThat(@​org.jspecify.nullness.Nullable Path) in Truth match #### Simplest upgrade strategy (if you can update all your code atomically in the same commit as the Truth upgrade) In the same commit: 1. Upgrade Truth to 1.4.0. 2. Replace `import static com.google.common.truth.Truth8.assertThat;` with `import static com.google.common.truth.Truth.assertThat;`. - If you use Kotlin, replace `import com.google.common.truth.Truth8.assertThat` with `import com.google.common.truth.Truth.assertThat`. 3. Replace `import com.google.common.truth.Truth8;` with `import com.google.common.truth.Truth;`. - again, similarly for Kotlin if needed 4. Replace remaining references to `Truth8` with references to `Truth`. - For example, replace `Truth8.assertThat(optional).isPresent()` with `Truth.assertThat(optional).isPresent()`. If you're feeling lucky, you can try this one-liner for the code updates: ```sh git grep -l Truth8 | xargs perl -pi -e 's/import static com.google.common.truth.Truth8.assertThat;/import static com.google.common.truth.Truth.assertThat;/g; s/import com.google.common.truth.Truth8.assertThat/import com.google.common.truth.Truth.assertThat/g; s/import com.google.common.truth.Truth8/import com.google.common.truth.Truth/g; s/\bTruth8[.]/Truth./g;' ``` After that process, it is possible that you'll still see build errors from ambiguous usages of `assertThat` static imports. If so, you can find a workaround in the section about overload ambiguity in the release notes for [1.3.0](https://togithub.com/google/truth/releases/tag/v1.3.0). Alternatively, you can wait to upgrade until after a future Truth release, which will eliminate the ambiguity by changing the signatures of some `Truth.assertThat` overloads. #### Incremental upgrade strategy If you have a very large repo or you have other reasons to prefer to upgrade incrementally, you can use the approach that we used inside Google. Roughly, that approach was: 1. Make the optional changes discussed in the release notes for [1.3.0](https://togithub.com/google/truth/releases/tag/v1.3.0). 2. For any remaining calls to `Truth8.assertThat`, change them to *avoid* static import. - That is, replace `assertThat(optional).isPresent()` with `Truth8.assertThat(optional).isPresent()`. 3. Upgrade Truth to 1.4.0. 4. Optionally replace references to `Truth8` with references to `Truth` (including restoring static imports if desired), as discussed in section about the simple upgrade strategy above. #### Optional additional changes - If you use `assertWithMessage(...).about(intStreams()).that(...)`, `expect.about(optionalLongs()).that(...)`, or similar, you can remove your call to `about`. This change will never be necessary; it is just a simplification. - This is similar to a previous optional change from [1.3.0](https://togithub.com/google/truth/releases/tag/v1.3.0), except that 1.3.0 solved this problem for `streams` and `optionals`, whereas 1.4.0 solves it for the other `Truth8` types. #### For help Please feel welcome to [open an issue](https://togithub.com/google/truth/issues/new) to report problems or request help. #### Changelog - Added the remaining `Truth8.assertThat` overloads to the main `Truth` class. ([`9be8e77`](https://togithub.com/google/truth/commit/9be8e774c), [`1f81827`](https://togithub.com/google/truth/commit/1f81827f1)) - Added more `that` overloads to make it possible to write type-specific assertions when using the remaining Java 8 types. ([`7c65fc6`](https://togithub.com/google/truth/commit/7c65fc611)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/java-logging-logback). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjE1My4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…logback to v0.131.1-alpha (#1270) * chore(deps): update dependency com.google.cloud:google-cloud-logging-logback to v0.131.1-alpha * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…33.0 (#1280) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.33.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…logback to v0.131.2-alpha (#1279) * chore(deps): update dependency com.google.cloud:google-cloud-logging-logback to v0.131.2-alpha * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…logback to v0.131.2-alpha (#1286) * chore(deps): update dependency com.google.cloud:google-cloud-logging-logback to v0.131.2-alpha * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…#1936) (#1290) Created by running: pip-compile requirements.in --generate-hashes --upgrade within synthtool/gcp/templates/java_library/.kokoro and synthtool/docker/owlbot/java/src/ Source-Link: googleapis/synthtool@853dbcd Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:084ad4c60551b075846bcb2405ec1c14b0d00ec1eb5503d4dd0d2a92cdc2d3e2 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…logback to v0.131.3-alpha (#1288) * chore(deps): update dependency com.google.cloud:google-cloud-logging-logback to v0.131.3-alpha * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…34.0 (#1289) * chore(deps): update dependency com.google.cloud:libraries-bom to v26.34.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
…3.5 (#1523) Co-authored-by: Jin Seop Kim <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [0.132.17-alpha](https://togithub.com/googleapis/java-logging-logback/compare/v0.132.16-alpha...v0.132.17-alpha) (2025-10-08) ### Dependencies * Update dependency com.google.cloud:google-cloud-logging to v3.23.6 ([#1531](https://togithub.com/googleapis/java-logging-logback/issues/1531)) ([fa24bc6](https://togithub.com/googleapis/java-logging-logback/commit/fa24bc69a1083118d3da284be1ceb4d543bafa27)) * Update dependency com.google.cloud:sdk-platform-java-config to v3.52.3 ([#1527](https://togithub.com/googleapis/java-logging-logback/issues/1527)) ([38f1dc8](https://togithub.com/googleapis/java-logging-logback/commit/38f1dc898775af937efef567c626e837b0fedb7c)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…in LoggingAppender (#1530) * fix: Add setCredentials method as alternative for setCredentialsFile in LoggingAppender * chore: Fix test requiring ProjectId * Apply suggestion from @gkevinzheng Co-authored-by: Kevin Zheng <[email protected]> --------- Co-authored-by: Kevin Zheng <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: add release-please config for protobuf-4.x * chore: remove redundant config
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…3.9 (#1577) This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Adoption](https://docs.renovatebot.com/merge-confidence/) | [Passing](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-logging](https://redirect.github.com/googleapis/java-logging) | `3.23.8` -> `3.23.9` |  |  |  |  | --- ### Release Notes <details> <summary>googleapis/java-logging (com.google.cloud:google-cloud-logging)</summary> ### [`v3.23.9`](https://redirect.github.com/googleapis/java-logging/blob/HEAD/CHANGELOG.md#3239-2025-12-11) [Compare Source](https://redirect.github.com/googleapis/java-logging/compare/v3.23.8...v3.23.9) ##### Bug Fixes - **deps:** Update the Java code generator (gapic-generator-java) to 2.64.2 ([fcb7ec1](https://redirect.github.com/googleapis/java-logging/commit/fcb7ec1ba7ae7c9a041d68c76e7b72a7e0861cf7)) ##### Dependencies - Update dependency com.google.cloud:sdk-platform-java-config to v3.54.2 ([#​1897](https://redirect.github.com/googleapis/java-logging/issues/1897)) ([ab9862f](https://redirect.github.com/googleapis/java-logging/commit/ab9862f655bc89fa3e4e381567dcd0a9d8afdbf9)) - Update googleapis/sdk-platform-java action to v2.64.2 ([#​1898](https://redirect.github.com/googleapis/java-logging/issues/1898)) ([5860f51](https://redirect.github.com/googleapis/java-logging/commit/5860f516596686ef3054969b8c69de7eb48629e3)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/java-logging-logback). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Mi4yIiwidXBkYXRlZEluVmVyIjoiNDIuNDIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
b/468377909
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing migration script