diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-05-03 08:04:53 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2021-05-11 21:49:21 +0200 |
commit | c8144a9c60279f8dc81b2506794acd24df31b9a3 (patch) | |
tree | 495231540cd6f04f02d7d7f22db38f36d716833a /deployment/src/main/java | |
parent | 25a6ef32df15d05904622326328882549095532f (diff) |
Initial checkin: Quarkus Google Cloud JSON Logging.
Change-Id: I264211f56c2bed4002ecdb6ead8a5321ada855fd
Diffstat (limited to 'deployment/src/main/java')
-rw-r--r-- | deployment/src/main/java/eu/mulk/quarkus/observability/googlecloud/jsonlogging/GoogleCloudLoggingProcessor.java | 23 |
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()); + } +} |