summaryrefslogtreecommitdiff
path: root/deployment/src/main/java/eu
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-01-15 16:13:01 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-01-15 21:14:23 +0100
commit348f2055bfb000633bb80e89bcf62ea037a5af0b (patch)
tree9ad5b0436a7fc24af466508a552366a1f867c7cb /deployment/src/main/java/eu
parent93ecfd1e0c1d1e40fb17e580a7a11de35383ef79 (diff)
Add a Spring Boot example and integration code.
Change-Id: Ia11dea607c74d9b4cc9a698e9ec92e930bd03f37
Diffstat (limited to 'deployment/src/main/java/eu')
-rw-r--r--deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/GoogleCloudLoggingProcessor.java22
-rw-r--r--deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/package-info.java2
2 files changed, 21 insertions, 3 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 668128f..fe012ee 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
@@ -7,18 +7,34 @@ import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.LogConsoleFormatBuildItem;
-class GoogleCloudLoggingProcessor {
+/**
+ * Registers {@link eu.mulk.quarkus.googlecloud.jsonlogging.Formatter} as the formatter for the
+ * embedded JBoss Log Manager.
+ */
+public class GoogleCloudLoggingProcessor {
private static final String FEATURE = "googlecloud-jsonlogging";
+ /**
+ * Returns the feature name of {@code "googlecloud-jsonlogging"}.
+ *
+ * @return the feature {@code "googlecloud-jsonlogging"}
+ */
@BuildStep
- FeatureBuildItem feature() {
+ public FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}
+ /**
+ * Constructs a {@link eu.mulk.quarkus.googlecloud.jsonlogging.Formatter} at runtime and returns
+ * it.
+ *
+ * @param recorder the recorder that implements the construction process at runtime.
+ * @return an instance of {@link eu.mulk.quarkus.googlecloud.jsonlogging.Formatter}.
+ */
@BuildStep
@Record(ExecutionTime.RUNTIME_INIT)
- LogConsoleFormatBuildItem setUpFormatter(GoogleCloudJsonLoggingRecorder recorder) {
+ public LogConsoleFormatBuildItem setUpFormatter(GoogleCloudJsonLoggingRecorder recorder) {
return new LogConsoleFormatBuildItem(recorder.initialize());
}
}
diff --git a/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/package-info.java b/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/package-info.java
new file mode 100644
index 0000000..eba03ab
--- /dev/null
+++ b/deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/package-info.java
@@ -0,0 +1,2 @@
+/** Quarkus deployment integration for the Google Cloud JSON Logging extension. */
+package eu.mulk.quarkus.googlecloud.jsonlogging.deployment;