update 优化 更改默认日志等级为info 避免日志过多(按需开启debug)
This commit is contained in:
parent
2c4306b436
commit
81f7a59caa
4
pom.xml
4
pom.xml
@ -64,7 +64,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||||
<profiles.active>local</profiles.active>
|
<profiles.active>local</profiles.active>
|
||||||
<logging.level>debug</logging.level>
|
<logging.level>info</logging.level>
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||||
<profiles.active>dev</profiles.active>
|
<profiles.active>dev</profiles.active>
|
||||||
<logging.level>debug</logging.level>
|
<logging.level>info</logging.level>
|
||||||
</properties>
|
</properties>
|
||||||
<activation>
|
<activation>
|
||||||
<!-- 默认环境 -->
|
<!-- 默认环境 -->
|
||||||
|
@ -61,8 +61,8 @@ public class SecurityConfig implements WebMvcConfigurer {
|
|||||||
|
|
||||||
// 有效率影响 用于临时测试
|
// 有效率影响 用于临时测试
|
||||||
// if (log.isDebugEnabled()) {
|
// if (log.isDebugEnabled()) {
|
||||||
// log.debug("剩余有效时间: {}", StpUtil.getTokenTimeout());
|
// log.info("剩余有效时间: {}", StpUtil.getTokenTimeout());
|
||||||
// log.debug("临时有效时间: {}", StpUtil.getTokenActivityTimeout());
|
// log.info("临时有效时间: {}", StpUtil.getTokenActivityTimeout());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -44,14 +44,14 @@ public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor {
|
|||||||
BufferedReader reader = request.getReader();
|
BufferedReader reader = request.getReader();
|
||||||
jsonParam = IoUtil.read(reader);
|
jsonParam = IoUtil.read(reader);
|
||||||
}
|
}
|
||||||
log.debug("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
|
log.info("[PLUS]开始请求 => URL[{}],参数类型[json],参数:[{}]", url, jsonParam);
|
||||||
} else {
|
} else {
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
if (MapUtil.isNotEmpty(parameterMap)) {
|
if (MapUtil.isNotEmpty(parameterMap)) {
|
||||||
String parameters = JsonUtils.toJsonString(parameterMap);
|
String parameters = JsonUtils.toJsonString(parameterMap);
|
||||||
log.debug("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
|
log.info("[PLUS]开始请求 => URL[{}],参数类型[param],参数:[{}]", url, parameters);
|
||||||
} else {
|
} else {
|
||||||
log.debug("[PLUS]开始请求 => URL[{}],无参数", url);
|
log.info("[PLUS]开始请求 => URL[{}],无参数", url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor {
|
|||||||
if (!prodProfile.equals(SpringUtils.getActiveProfile())) {
|
if (!prodProfile.equals(SpringUtils.getActiveProfile())) {
|
||||||
StopWatch stopWatch = invokeTimeTL.get();
|
StopWatch stopWatch = invokeTimeTL.get();
|
||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
log.debug("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
|
log.info("[PLUS]结束请求 => URL[{}],耗时:[{}]毫秒", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime());
|
||||||
invokeTimeTL.remove();
|
invokeTimeTL.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user