maven
<dependency>
<groupId>com.getsentry.raven</groupId>
<artifactId>raven-logback</artifactId>
<version>8.0.3</version>
</dependency>
配置logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<jmxConfigurator/>
<appender name="SENTRY" class="com.getsentry.raven.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
<appender-ref ref="SENTRY" />
</root>
</configuration>
配置环境变量
SENTRY_ENVIRONMENT=test
SENTRY_DSN=http://1d59201178e540ec8172870df4413aa2:20131e8bb98c4ab48693e4f9cd6ef98a@192.168.99.100:9000/2
想获取最新内容,请关注微信公众号
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。