From 348f2055bfb000633bb80e89bcf62ea037a5af0b Mon Sep 17 00:00:00 2001
From: Matthias Andreas Benkard <code@mail.matthias.benkard.de>
Date: Sat, 15 Jan 2022 16:13:01 +0100
Subject: Add a Spring Boot example and integration code.

Change-Id: Ia11dea607c74d9b4cc9a698e9ec92e930bd03f37
---
 .../deployment/GoogleCloudLoggingProcessor.java    | 22 +++++++++++++++++++---
 .../jsonlogging/deployment/package-info.java       |  2 ++
 2 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 deployment/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/deployment/package-info.java

(limited to 'deployment/src/main')

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;
-- 
cgit v1.2.3