Spring Boot Actuator-缺少** loggers和** logfile **端点

时间:2019-05-29 11:12:03

标签: spring spring-boot spring-mvc actuator

我正在尝试使用不带@SpringBootApplication的Spring MVC(v5)设置Spring Boot Actuator(v2)。 我设法使端点正常运行,至少它们显示了一些数据。

我想知道的是标题中提到的这两个端点。根据Spring doc的介绍,两者都应该可用。

我尝试添加用于记录的属性:

logging.level.org.springframework.boot.autoconfigure.logging=DEBUG
logging.file=test.log

但是那也不起作用。

我的执行器配置: 等级依赖性:

// springVersion=5.1.+
    compile "org.springframework:spring-beans:$springVersion"
    compile "org.springframework:spring-webmvc:$springVersion"
    compile "org.springframework:spring-jdbc:$springVersion"

    // :: Actuator
    compile group: 'org.springframework.boot:spring-boot-starter-actuator:2.1.5.RELEASE'
    compile group: 'org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.5.RELEASE'


    // :: Metrics
    compile "io.micrometer:micrometer-core:1.1.4"
    compile "io.micrometer:micrometer-registry-prometheus:1.1.4"

属性:

management.endpoints.web.exposure.include=*
management.metrics.enable.root=true

配置

@Configuration
@EnableAutoConfiguration(exclude = {
        RabbitHealthIndicatorAutoConfiguration.class,
        CassandraHealthIndicatorAutoConfiguration.class,
        CassandraReactiveHealthIndicatorAutoConfiguration.class,
        CloudFoundryActuatorAutoConfiguration.class,
        ReactiveCloudFoundryActuatorAutoConfiguration.class,
        ShutdownEndpointAutoConfiguration.class,
        CouchbaseHealthIndicatorAutoConfiguration.class,
        CouchbaseReactiveHealthIndicatorAutoConfiguration.class,
        ElasticSearchClientHealthIndicatorAutoConfiguration.class,
        ElasticSearchJestHealthIndicatorAutoConfiguration.class,
        ElasticSearchRestHealthIndicatorAutoConfiguration.class,
        JmxEndpointAutoConfiguration.class,
        InfluxDbHealthIndicatorAutoConfiguration.class,
        JolokiaEndpointAutoConfiguration.class,
        LdapHealthIndicatorAutoConfiguration.class,
        LiquibaseEndpointAutoConfiguration.class,
        MailHealthIndicatorAutoConfiguration.class,
        KafkaMetricsAutoConfiguration.class,
        LogbackMetricsAutoConfiguration.class,
        RabbitMetricsAutoConfiguration.class,
        AppOpticsMetricsExportAutoConfiguration.class,
        AtlasMetricsExportAutoConfiguration.class,
        DatadogMetricsExportAutoConfiguration.class,
        DynatraceMetricsExportAutoConfiguration.class,
        ElasticMetricsExportAutoConfiguration.class,
        GangliaMetricsExportAutoConfiguration.class,
        GraphiteMetricsExportAutoConfiguration.class,
        HumioMetricsExportAutoConfiguration.class,
        InfluxMetricsExportAutoConfiguration.class,
        JmxMetricsExportAutoConfiguration.class,
        KairosMetricsExportAutoConfiguration.class,
        NewRelicMetricsExportAutoConfiguration.class,
        StatsdMetricsExportAutoConfiguration.class,
        SignalFxMetricsExportAutoConfiguration.class,
        WavefrontMetricsExportAutoConfiguration.class,
        WebFluxMetricsAutoConfiguration.class,
        TomcatMetricsAutoConfiguration.class,
        MongoHealthIndicatorAutoConfiguration.class,
        MongoReactiveHealthIndicatorAutoConfiguration.class,
        Neo4jHealthIndicatorAutoConfiguration.class,
        RedisHealthIndicatorAutoConfiguration.class,
        RedisReactiveHealthIndicatorAutoConfiguration.class,
        ReactiveManagementWebSecurityAutoConfiguration.class,
        SolrHealthIndicatorAutoConfiguration.class,
        ReactiveManagementContextAutoConfiguration.class
})
public class DI_Actuator {
}

我确实有多个端点可用,但是缺少这两个端点。 注意:由于某些冲突,我已排除了LogbackMetricsAutoConfiguration.class,但不确定是否是这个原因?

0 个答案:

没有答案