log4j2-plus-spring-boot-starter
log4j2 jdbc starter for spring boot
说明
基于 log4j2 的 Spring Boot Starter 实现
- 整合log4j2实现,Log4j数据库日志记录
Maven
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>log4j2-plus-spring-boot-starter</artifactId>
<version>${project.version}</version>
</dependency>
项目中引入 micrometer-prometheus 依赖,可实现Log4j2组件的指标采集
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
# HELP log4j2_events_total Number of fatal level log events
# TYPE log4j2_events_total counter
log4j2_events_total{application="app-test",level="trace",} 0.0
log4j2_events_total{application="app-test",level="warn",} 4.0
log4j2_events_total{application="app-test",level="fatal",} 0.0
log4j2_events_total{application="app-test",level="info",} 445.0
log4j2_events_total{application="app-test",level="debug",} 40.0
log4j2_events_total{application="app-test",level="error",} 6.0
Simple
https://github.com/vindell/spring-boot-starter-samples/tree/master/spring-boot-sample-log4j2
作者:Jeebiz 创建时间:2023-03-21 00:05
最后编辑:Jeebiz 更新时间:2024-10-05 00:01
最后编辑:Jeebiz 更新时间:2024-10-05 00:01