Add Encoder support to LoggingAppender#2560
Add Encoder support to LoggingAppender#2560glindstedt wants to merge 3 commits intogoogleapis:masterfrom
Conversation
|
Any chance of getting this reviewed? |
2cd0503 to
dba4b75
Compare
|
@jabubake would you mind taking a look? (Or nominating someone else?) |
|
Hi guys,
At the time when encoders are not supported... |
|
#2765 which was merged a few days ago fixes my main use case for this PR. I won't resolve the conflicts unless it's actually going to get reviewed, so if general encoder support is not needed feel free to close this PR. |
|
@glindste, I'm going to close this PR due to staleness. Please feel free to reopen, and resolve conflicts if this is still relevant. |
|
Hi |
🤖 I have created a release *beep* *boop* --- ## [1.142.0](https://togithub.com/googleapis/java-pubsub/compare/v1.141.5...v1.142.0) (2025-10-07) ### Features * Support the protocol version in StreamingPullRequest ([af40810](https://togithub.com/googleapis/java-pubsub/commit/af40810ea0668ce4e8c4d69bdbb4b281073976d0)) ### Bug Fixes * **deps:** Update the Java code generator (gapic-generator-java) to 2.62.3 ([af40810](https://togithub.com/googleapis/java-pubsub/commit/af40810ea0668ce4e8c4d69bdbb4b281073976d0)) ### Dependencies * Update actions/checkout action to v5 ([#2562](https://togithub.com/googleapis/java-pubsub/issues/2562)) ([b7fa499](https://togithub.com/googleapis/java-pubsub/commit/b7fa49968e85dfeba8a84ea29f8ddf9d33ef22c5)) * Update actions/checkout action to v5 ([#2573](https://togithub.com/googleapis/java-pubsub/issues/2573)) ([4153dba](https://togithub.com/googleapis/java-pubsub/commit/4153dbacb386b130780c8d1e5596e3502af8e32b)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.55.1 ([#2566](https://togithub.com/googleapis/java-pubsub/issues/2566)) ([66c9ec4](https://togithub.com/googleapis/java-pubsub/commit/66c9ec4a26b76ca384dce71a8ab6bce8cd34b8a3)) * Update dependency com.google.cloud:google-cloud-core to v2.60.2 ([#2557](https://togithub.com/googleapis/java-pubsub/issues/2557)) ([460bcd9](https://togithub.com/googleapis/java-pubsub/commit/460bcd9158e7058f710f43200b7b7737eb47839c)) * Update dependency com.google.cloud:google-cloud-core to v2.60.3 ([#2571](https://togithub.com/googleapis/java-pubsub/issues/2571)) ([ac2c85a](https://togithub.com/googleapis/java-pubsub/commit/ac2c85ad62525aee236af54f6b5c9b1eacf4d22a)) * Update dependency com.google.cloud:google-cloud-storage to v2.58.0 ([#2561](https://togithub.com/googleapis/java-pubsub/issues/2561)) ([0189388](https://togithub.com/googleapis/java-pubsub/commit/0189388edb4d618d65f33718922ca1b11f71cb15)) * Update dependency com.google.cloud:sdk-platform-java-config to v3.52.3 ([#2572](https://togithub.com/googleapis/java-pubsub/issues/2572)) ([0785ee4](https://togithub.com/googleapis/java-pubsub/commit/0785ee490e858c104c420046e0098d81154ae273)) * Update dependency org.assertj:assertj-core to v3.27.6 ([#2560](https://togithub.com/googleapis/java-pubsub/issues/2560)) ([c82766a](https://togithub.com/googleapis/java-pubsub/commit/c82766a9efb2bb4df01fb7fdcb35259db39e05c7)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [1.142.0](https://togithub.com/googleapis/java-pubsub/compare/v1.141.5...v1.142.0) (2025-10-07) ### Features * Support the protocol version in StreamingPullRequest ([648cbb8](https://togithub.com/googleapis/java-pubsub/commit/648cbb8c912be347f09a6ec30288c083103762a9)) ### Bug Fixes * **deps:** Update the Java code generator (gapic-generator-java) to 2.62.3 ([648cbb8](https://togithub.com/googleapis/java-pubsub/commit/648cbb8c912be347f09a6ec30288c083103762a9)) ### Dependencies * Update actions/checkout action to v5 ([#2562](https://togithub.com/googleapis/java-pubsub/issues/2562)) ([aec9bee](https://togithub.com/googleapis/java-pubsub/commit/aec9bee0ea8c1440c80f62dac1f7dca3619c5356)) * Update actions/checkout action to v5 ([#2573](https://togithub.com/googleapis/java-pubsub/issues/2573)) ([7f637de](https://togithub.com/googleapis/java-pubsub/commit/7f637dee56eb5898d6d30ddd499caed2eac92b4b)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.55.1 ([#2566](https://togithub.com/googleapis/java-pubsub/issues/2566)) ([07e69f8](https://togithub.com/googleapis/java-pubsub/commit/07e69f806737fbdf56323f30203deb0107938ca3)) * Update dependency com.google.cloud:google-cloud-core to v2.60.2 ([#2557](https://togithub.com/googleapis/java-pubsub/issues/2557)) ([fcbe864](https://togithub.com/googleapis/java-pubsub/commit/fcbe864453521254287e1e44835ae793e0eaa939)) * Update dependency com.google.cloud:google-cloud-core to v2.60.3 ([#2571](https://togithub.com/googleapis/java-pubsub/issues/2571)) ([12f0d51](https://togithub.com/googleapis/java-pubsub/commit/12f0d514ddd806e9ac98b09304d486d151d3a49a)) * Update dependency com.google.cloud:google-cloud-storage to v2.58.0 ([#2561](https://togithub.com/googleapis/java-pubsub/issues/2561)) ([c962a7e](https://togithub.com/googleapis/java-pubsub/commit/c962a7efa01a1c2e61eb9e9404c37f3064d6708e)) * Update dependency com.google.cloud:sdk-platform-java-config to v3.52.3 ([#2572](https://togithub.com/googleapis/java-pubsub/issues/2572)) ([d899d3b](https://togithub.com/googleapis/java-pubsub/commit/d899d3bd39abbb13324a16cea8a1be093d69337e)) * Update dependency org.assertj:assertj-core to v3.27.6 ([#2560](https://togithub.com/googleapis/java-pubsub/issues/2560)) ([fd33477](https://togithub.com/googleapis/java-pubsub/commit/fd3347781a299fdd30ee90a4a25dc4d93e794428)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This PR adds support to define a layout pattern for the loglines as described here. This is useful for example if you want to include stacktraces in the log messages sent to stackdriver.
I chose to provide a default encoder which matches the current log output, in order to not break backwards compatibility with any existing configurations.
Note that I have not tested configuring the encoder through
logback.xml, the project I have available to test with configures the appender manually.