summaryrefslogtreecommitdiff
path: root/deployment/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/src/main')
-rw-r--r--deployment/src/main/java/eu/mulk/quarkus/observability/googlecloud/jsonlogging/GoogleCloudLoggingProcessor.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/deployment/src/main/java/eu/mulk/quarkus/observability/googlecloud/jsonlogging/GoogleCloudLoggingProcessor.java b/deployment/src/main/java/eu/mulk/quarkus/observability/googlecloud/jsonlogging/GoogleCloudLoggingProcessor.java
new file mode 100644
index 0000000..8ecf000
--- /dev/null
+++ b/deployment/src/main/java/eu/mulk/quarkus/observability/googlecloud/jsonlogging/GoogleCloudLoggingProcessor.java
@@ -0,0 +1,23 @@
+package eu.mulk.quarkus.observability.googlecloud.jsonlogging;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.LogConsoleFormatBuildItem;
+
+class GoogleCloudLoggingProcessor {
+
+ private static final String FEATURE = "googlecloud-jsonlogging";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ @Record(ExecutionTime.RUNTIME_INIT)
+ LogConsoleFormatBuildItem setUpFormatter(GoogleCloudLoggingRecorder recorder) {
+ return new LogConsoleFormatBuildItem(recorder.initialize());
+ }
+}