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.runtime.RuntimeValue; |
| 4 | import io.quarkus.runtime.annotations.Recorder; |
| 5 | import java.util.Optional; |
| 6 | import java.util.logging.Formatter; |
| 7 | import javax.json.bind.spi.JsonbProvider; |
| 8 | |
| 9 | @Recorder |
| 10 | public class GoogleCloudLoggingRecorder { |
| 11 | |
| 12 | public RuntimeValue<Optional<Formatter>> initialize() { |
| 13 | var jsonb = JsonbProvider.provider().create().build(); |
| 14 | return new RuntimeValue<>(Optional.of(new GoogleCloudLoggingFormatter(jsonb))); |
| 15 | } |
| 16 | } |