Quick start | FAQs | Report an issue
alarm-spring-boot-starter will help you to View error logs from compony-wechat or DingDing.
JDK compatibility: 1.8
<dependency>
<groupId>cn.atong.leek</groupId>
<artifactId>alarm-spring-boot-starter</artifactId>
<version>1.0.1</version>
</dependency>
alarm:
address: [dingding or compony-wechat reboot webHook]
mode: [dingding/companyWeChat; default:dingding]
spring:
application:
name: [your app name]
profiles:
active: [for example dev]
指定 logback appender 的 Filter,如下:
<!--控制日志输出位置的Appender-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<filter class="cn.atong.leek.alarm.filter.AlarmFilter"/>
<!--日志消息格式的配置-->
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %C.%M:%L - [traceId:%X{traceId}] [businessId:%X{businessId}]
%m%n
</pattern>
</encoder>
</appender>
1.0.2 可过滤自定义业务异常
wechat : GaiBianShiJieOvO
gmail : atonglvv@gmail.com