summaryrefslogtreecommitdiff
path: root/runtime/src/main/java/eu/mulk/quarkus/googlecloud/jsonlogging/GoogleCloudJsonLoggingRecorder.java
blob: ace4a28957a30741a26a2af2f16cb7ba141f1eb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package eu.mulk.quarkus.googlecloud.jsonlogging;

import io.quarkus.arc.Arc;
import io.quarkus.runtime.RuntimeValue;
import io.quarkus.runtime.annotations.Recorder;
import java.util.Optional;
import java.util.stream.Collectors;

@Recorder
public class GoogleCloudJsonLoggingRecorder {
  public RuntimeValue<Optional<java.util.logging.Formatter>> initialize() {
    var parameterProviders =
        Arc.container().select(ParameterProvider.class).stream().collect(Collectors.toList());
    return new RuntimeValue<>(Optional.of(new Formatter(parameterProviders)));
  }
}