Matthias Andreas Benkard | c8144a9 | 2021-05-03 08:04:53 +0200 | [diff] [blame^] | 1 | package eu.mulk.quarkus.observability.googlecloud.jsonlogging; |
| 2 | |
| 3 | import io.quarkus.deployment.annotations.BuildStep; |
| 4 | import io.quarkus.deployment.annotations.ExecutionTime; |
| 5 | import io.quarkus.deployment.annotations.Record; |
| 6 | import io.quarkus.deployment.builditem.FeatureBuildItem; |
| 7 | import io.quarkus.deployment.builditem.LogConsoleFormatBuildItem; |
| 8 | |
| 9 | class GoogleCloudLoggingProcessor { |
| 10 | |
| 11 | private static final String FEATURE = "googlecloud-jsonlogging"; |
| 12 | |
| 13 | @BuildStep |
| 14 | FeatureBuildItem feature() { |
| 15 | return new FeatureBuildItem(FEATURE); |
| 16 | } |
| 17 | |
| 18 | @BuildStep |
| 19 | @Record(ExecutionTime.RUNTIME_INIT) |
| 20 | LogConsoleFormatBuildItem setUpFormatter(GoogleCloudLoggingRecorder recorder) { |
| 21 | return new LogConsoleFormatBuildItem(recorder.initialize()); |
| 22 | } |
| 23 | } |