api开始log
api开始log api开始log
This commit is contained in:
@@ -58,6 +58,7 @@ public class ApiRequestLogAspect {
|
||||
long start = System.currentTimeMillis();
|
||||
try {
|
||||
MDC.put(TRACE_UUID, UUID.randomUUID().toString());
|
||||
log.info("====== Api called start ======");
|
||||
Object result = joinPoint.proceed();
|
||||
requestInfo(joinPoint, request, requestURI);
|
||||
try {
|
||||
@@ -87,7 +88,7 @@ public class ApiRequestLogAspect {
|
||||
|
||||
private void requestInfo(ProceedingJoinPoint joinPoint, HttpServletRequest request, String uri) {
|
||||
StringBuilder msg = new StringBuilder()
|
||||
.append("====== Api called start ======").append(" ")
|
||||
.append("====== Api called ======").append(" ")
|
||||
.append("[URL]").append(uri).append(" ")
|
||||
.append("[METHOD]").append(request.getMethod()).append(" ")
|
||||
.append("[IP]").append(request.getRemoteAddr()).append(" ")
|
||||
|
Reference in New Issue
Block a user