Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spring-boot-starter-dsp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
shenjiaqing
spring-boot-starter-dsp
Commits
9d4f9eb3
Commit
9d4f9eb3
authored
Dec 30, 2021
by
shenjiaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
01db5b22
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
build.gradle
spring-boot-starter-dsp-util/build.gradle
+2
-0
CatUtils.java
...a/cn/com/duiba/spring/boot/starter/dsp/util/CatUtils.java
+29
-0
No files found.
spring-boot-starter-dsp-util/build.gradle
View file @
9d4f9eb3
...
...
@@ -9,6 +9,8 @@ repositories {
}
dependencies
{
compile
"cn.com.duiba.boot:spring-boot-starter-cat"
testImplementation
'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly
'org.junit.jupiter:junit-jupiter-engine:5.7.0'
compile
"cn.com.duiba.boot:spring-boot-starter-redis"
...
...
spring-boot-starter-dsp-util/src/main/java/cn/com/duiba/spring/boot/starter/dsp/util/CatUtils.java
0 → 100644
View file @
9d4f9eb3
package
cn
.
com
.
duiba
.
spring
.
boot
.
starter
.
dsp
.
util
;
import
com.dianping.cat.Cat
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
final
class
CatUtils
{
/**
* 日志工具
*/
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CatUtils
.
class
);
/**
* 业务指标日志-次数统计
* @param bizName
*/
public
static
void
log
(
String
bizName
){
try
{
Cat
.
logMetricForCount
(
bizName
);
}
catch
(
Exception
e
){
logger
.
error
(
"CatTools.MetricForCount · { Cat } 指标计数 :: Error : 异常 , [ 指标名称 : {} ] , 请检查错误并修复. "
,
bizName
,
e
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment