api开始log

api开始log

api开始log
This commit is contained in:
2025-05-06 11:15:14 +08:00
parent 46319be250
commit c70a2d4ce1

View File

@@ -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(" ")