diff options
| author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2026-02-02 18:51:19 +0100 |
|---|---|---|
| committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2026-02-02 18:58:43 +0100 |
| commit | 13d08a8b815fafb9a009e3773af92ad2696cb5e5 (patch) | |
| tree | c8116d35c53b749f72a2bf54d3bebce41beded03 | |
| parent | 6d73e12e018980785808e13e393f41f6e20d18d6 (diff) | |
fix!: Update Quarkus to 3.31.1, use RuntimeValue for configuration.
Quarkus 3.31.1 is stricter than previous versions. This change brings
the implementation of the recorder in line with its expectations.
BREAKING CHANGE: API changes to GoogleCloudLoggingProcessor,
GoogleCloudJsonLoggingRecorder.
Change-Id: I98fd2a0308c664fb94278372a884dc42311a374e
3 files changed, 12 insertions, 8 deletions
diff --git a/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/GoogleCloudLoggingProcessor.java b/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/GoogleCloudLoggingProcessor.java index 8ef0962..7d4a93f 100644 --- a/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/GoogleCloudLoggingProcessor.java +++ b/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/GoogleCloudLoggingProcessor.java @@ -4,7 +4,6 @@ package eu.mulk.quarkus.googlecloud.jsonlogging.deployment; -import eu.mulk.quarkus.googlecloud.jsonlogging.runtime.GoogleCloudJsonLoggingConfiguration; import eu.mulk.quarkus.googlecloud.jsonlogging.runtime.GoogleCloudJsonLoggingRecorder; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; @@ -39,8 +38,7 @@ public class GoogleCloudLoggingProcessor { */ @BuildStep @Record(ExecutionTime.RUNTIME_INIT) - public LogConsoleFormatBuildItem setUpFormatter( - GoogleCloudJsonLoggingRecorder recorder, GoogleCloudJsonLoggingConfiguration configuration) { - return new LogConsoleFormatBuildItem(recorder.initialize(configuration)); + public LogConsoleFormatBuildItem setUpFormatter(GoogleCloudJsonLoggingRecorder recorder) { + return new LogConsoleFormatBuildItem(recorder.initialize()); } } @@ -72,7 +72,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later <spotless-plugin.version>2.44.5</spotless-plugin.version> <surefire-plugin.version>3.5.3</surefire-plugin.version> - <quarkus.version>3.24.2</quarkus.version> + <quarkus.version>3.31.1</quarkus.version> </properties> <distributionManagement> diff --git a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingRecorder.java b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingRecorder.java index 74b63c6..2b253da 100644 --- a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingRecorder.java +++ b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingRecorder.java @@ -18,6 +18,13 @@ import java.util.stream.Collectors; @Recorder public class GoogleCloudJsonLoggingRecorder { + private final RuntimeValue<GoogleCloudJsonLoggingConfiguration> configuration; + + public GoogleCloudJsonLoggingRecorder( + RuntimeValue<GoogleCloudJsonLoggingConfiguration> configuration) { + this.configuration = configuration; + } + /** * Registers {@link Formatter} as a log formatter for the application. * @@ -26,9 +33,8 @@ public class GoogleCloudJsonLoggingRecorder { * * @return the registered {@link Formatter}. */ - public RuntimeValue<Optional<java.util.logging.Formatter>> initialize( - GoogleCloudJsonLoggingConfiguration configuration) { - if (!configuration.enabled()) { + public RuntimeValue<Optional<java.util.logging.Formatter>> initialize() { + if (!configuration.getValue().enabled()) { return new RuntimeValue<>(Optional.empty()); } |
