Java Spring Micrometer console output

Moki Lv6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import io.micrometer.core.instrument.Clock;
import io.micrometer.core.instrument.logging.LoggingMeterRegistry;
import io.micrometer.core.instrument.logging.LoggingRegistryConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import java.time.Duration;

@Component
public class Micrometer {

@Bean
LoggingMeterRegistry loggingMeterRegistry() {
return new LoggingMeterRegistry(new LoggingRegistryConfig() {

@Override
public Duration step() {
return Duration.ofSeconds(30);
}

@Override
public String get(String key) {
return null;
}

}, Clock.SYSTEM);
}

}
On this page
Java Spring Micrometer console output