|
@@ -132,7 +132,7 @@ public class ControllerAspect {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- LOG.info(String.format("[ControllerAspect][request][%s] - %s %s", method, path, params.toString()));
|
|
|
|
|
|
+ LOG.info(String.format("[request][%s] - %s %s", method, path, params.toString()));
|
|
}
|
|
}
|
|
|
|
|
|
Object ret;
|
|
Object ret;
|
|
@@ -152,11 +152,11 @@ public class ControllerAspect {
|
|
try {
|
|
try {
|
|
httpMethodProcessor.onException(request, args, e);
|
|
httpMethodProcessor.onException(request, args, e);
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
- LOG.error("[ControllerAspect] processor1 - " + ex.getMessage(), ex);
|
|
|
|
|
|
+ LOG.error("processor1 - " + ex.getMessage(), ex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- LOG.error(String.format("[ControllerAspect][execute fail][%s] - %s, cost %sms, err is %s"
|
|
|
|
|
|
+ LOG.error(String.format("[execute fail][%s] - %s, cost %sms, err is %s"
|
|
, method, path, System.currentTimeMillis() - startTime, e.getMessage()));
|
|
, method, path, System.currentTimeMillis() - startTime, e.getMessage()));
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
@@ -165,7 +165,7 @@ public class ControllerAspect {
|
|
try {
|
|
try {
|
|
httpMethodProcessor.onSuccess(request, args, ret);
|
|
httpMethodProcessor.onSuccess(request, args, ret);
|
|
} catch (Exception ex) {
|
|
} catch (Exception ex) {
|
|
- LOG.error("[ControllerAspect] processor2 - " + ex.getMessage(), ex);
|
|
|
|
|
|
+ LOG.error("processor2 - " + ex.getMessage(), ex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -176,17 +176,17 @@ public class ControllerAspect {
|
|
|
|
|
|
if (LOG.isDebugEnabled() && logProperties.isNormalResponseLogEnable()) {
|
|
if (LOG.isDebugEnabled() && logProperties.isNormalResponseLogEnable()) {
|
|
if (ret == null) {
|
|
if (ret == null) {
|
|
- LOG.debug("[ControllerAspect] status = ok, responseMsg = void");
|
|
|
|
|
|
+ LOG.debug("status = ok, responseMsg = void");
|
|
} else if (ret instanceof ResponseEntity) {
|
|
} else if (ret instanceof ResponseEntity) {
|
|
ResponseEntity<?> re = (ResponseEntity<?>) ret;
|
|
ResponseEntity<?> re = (ResponseEntity<?>) ret;
|
|
Object body = re.getBody();
|
|
Object body = re.getBody();
|
|
|
|
|
|
String content = this.parseContent(body);
|
|
String content = this.parseContent(body);
|
|
- LOG.debug(String.format("[ControllerAspect] status = %s, responseMsg = %s",
|
|
|
|
|
|
+ LOG.debug(String.format("status = %s, responseMsg = %s",
|
|
re.getStatusCodeValue(), content));
|
|
re.getStatusCodeValue(), content));
|
|
} else {
|
|
} else {
|
|
String content = this.parseContent(ret);
|
|
String content = this.parseContent(ret);
|
|
- LOG.debug(String.format("[ControllerAspect] status = ok, responseMsg = %s", content));
|
|
|
|
|
|
+ LOG.debug(String.format("status = ok, responseMsg = %s", content));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -194,7 +194,7 @@ public class ControllerAspect {
|
|
response.setHeader("Trace-Id", ThreadLocalUtil.getTraceId());
|
|
response.setHeader("Trace-Id", ThreadLocalUtil.getTraceId());
|
|
response.setHeader("cost", String.valueOf(System.currentTimeMillis() - startTime));
|
|
response.setHeader("cost", String.valueOf(System.currentTimeMillis() - startTime));
|
|
|
|
|
|
- LOG.info(String.format("[ControllerAspect][response][%s] - %s, cost %sms", method, path, System.currentTimeMillis() - startTime));
|
|
|
|
|
|
+ LOG.info(String.format("[response][%s] - %s, cost %sms", method, path, System.currentTimeMillis() - startTime));
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -233,7 +233,7 @@ public class ControllerAspect {
|
|
// content to json
|
|
// content to json
|
|
content = new JsonMapper().toJson(obj);
|
|
content = new JsonMapper().toJson(obj);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- LOG.warn("[ControllerAspect] parseContent " + e.getMessage());
|
|
|
|
|
|
+ LOG.warn("parseContent " + e.getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
if (content == null) {
|
|
if (content == null) {
|