summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/pom.xml2
-rw-r--r--runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingConfiguration.java17
-rw-r--r--runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingRecorder.java2
-rw-r--r--runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java4
4 files changed, 15 insertions, 10 deletions
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 952463d..04a9e35 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -14,7 +14,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<parent>
<groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
<artifactId>quarkus-googlecloud-jsonlogging-parent</artifactId>
- <version>6.5.1-SNAPSHOT</version>
+ <version>6.6.1-SNAPSHOT</version>
</parent>
<artifactId>quarkus-googlecloud-jsonlogging</artifactId>
diff --git a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingConfiguration.java b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingConfiguration.java
index 21a4ca9..72d1cfa 100644
--- a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingConfiguration.java
+++ b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/GoogleCloudJsonLoggingConfiguration.java
@@ -4,19 +4,24 @@
package eu.mulk.quarkus.googlecloud.jsonlogging.runtime;
-import io.quarkus.runtime.annotations.ConfigItem;
-import io.quarkus.runtime.annotations.ConfigPhase;
+import static io.quarkus.runtime.annotations.ConfigPhase.RUN_TIME;
+
import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+import io.smallrye.config.WithParentName;
/** Configuration for console logging in Google Cloud Logging JSON format. */
-@ConfigRoot(prefix = "quarkus.log.console", name = "google", phase = ConfigPhase.RUN_TIME)
-public class GoogleCloudJsonLoggingConfiguration {
+@ConfigMapping(prefix = "quarkus.log.console.google")
+@ConfigRoot(phase = RUN_TIME)
+public interface GoogleCloudJsonLoggingConfiguration {
/**
* Whether to enable Google Cloud Logging JSON logging to <code>stdout</code>/<code>stderr</code>.
*
* <p>Replaces the regular plain-text format for console logs.
*/
- @ConfigItem(defaultValue = "true", name = ConfigItem.PARENT)
- public boolean enabled;
+ @WithDefault("true")
+ @WithParentName
+ boolean enabled();
}
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 af09231..74b63c6 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
@@ -28,7 +28,7 @@ public class GoogleCloudJsonLoggingRecorder {
*/
public RuntimeValue<Optional<java.util.logging.Formatter>> initialize(
GoogleCloudJsonLoggingConfiguration configuration) {
- if (!configuration.enabled) {
+ if (!configuration.enabled()) {
return new RuntimeValue<>(Optional.empty());
}
diff --git a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java
index bdfa657..d20a203 100644
--- a/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java
+++ b/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/runtime/package-info.java
@@ -43,7 +43,7 @@
* <dependency>
* <groupId>eu.mulk.quarkus-googlecloud-jsonlogging</groupId>
* <artifactId>quarkus-googlecloud-jsonlogging</artifactId>
- * <version>6.5.0</version>
+ * <version>6.6.0</version>
* </dependency>
*
* ...
@@ -59,7 +59,7 @@
* dependencies {
* // ...
*
- * implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.5.0")
+ * implementation("eu.mulk.quarkus-googlecloud-jsonlogging:quarkus-googlecloud-jsonlogging:6.6.0")
*
* // ...
* }