In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1. SentrySentry is an open source error tracking tool that allows developers to monitor and repair crashed programs in real time, iterate continuously and improve efficiency. After the Sentry is integrated into the program code, the exception information can be sent to the Sentry service, and the alarm notification through mail, nails and other alarm can be realized by configuring the Sentry plug-in. Sentry official website: Appender of log4j is provided in https://sentry.io/welcome/2 and log4j/logback on sentrySentry, and specific level logs in log can be sent to Sentry.
Integrate Sentry into the code
Use Maven:
Io.sentry
Sentry-logback
1.7.5
Use SBT:
LibraryDependencies + = "io.sentry"% "sentry-logback"% "1.7.5"
Configuration of logback.xml
% d {HH:mm:ss.SSS} [% thread]%-5level% logger {36} -% msg%n
WARN
3. Configure DSN (Data Source Name) of Sentry
There are the following centralized implementation methods.
Sentry.properties configured under classpath
Dsn= https://public:private@host:port/1 is configured in Java system Properties (Java System Properties)
Java-Dsentry.dsn= https://public:private@host:port/1-jar app.jar is configured in the system environment variable
SENTRY_DSN= https://public:private@host:port/1 java-jar app.jar is implemented in code
Import io.sentry.Sentry
Sentry.init ("https://public:private@host:port/1");"
I used the second way to configure the JVM parameters of the startup program
4. Code implementation
For specific project codes, please refer to https://github.com/chocolateBlack/loghub-logback-sentry.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.