diff options
Diffstat (limited to 'deployment/src/main')
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; |