Commit 9d4f9eb3 authored by shenjiaqing's avatar shenjiaqing

提交代码

parent 01db5b22
......@@ -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"
......
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);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment