Commit a179305b authored by yanzg's avatar yanzg

常规BUG的修改

parent 4fb7598b
......@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.yanzuoguang.cloud.CloudContans;
import com.yanzuoguang.util.cache.MemoryCache;
import com.yanzuoguang.util.contants.ResultConstants;
import com.yanzuoguang.util.exception.ExceptionHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.log.Log;
......@@ -153,7 +154,6 @@ public class BaseRequestAspect implements ThreadNext.Next {
protected void responseLog(String tag, String url, ProceedingJoinPoint joinPoint, long start, Object result, Exception resultEx) {
try {
String name = joinPoint.getSignature().getName();
// 处理结果
ResponseResult responseResult;
if (result instanceof ResponseResult) {
......@@ -164,8 +164,10 @@ public class BaseRequestAspect implements ThreadNext.Next {
long time = System.currentTimeMillis() - start;
if (resultEx != null) {
Log.error(joinPoint.getSignature().getDeclaringType(), "%s [ %s ] time %d ms, error: %s",
tag, name, time, getMaxString(resultEx.getMessage()));
responseResult = ExceptionHelper.getError(resultEx);
Log.error(joinPoint.getSignature().getDeclaringType(), "%s [ %s ] time %d ms, result: %s",
tag, name, time, getMaxString(JsonHelper.serialize(responseResult)));
resultEx.printStackTrace();
} else {
Log.info(joinPoint.getSignature().getDeclaringType(), "%s [ %s ] time %d ms, result: %s",
tag, name, time, getMaxString(JsonHelper.serialize(responseResult)));
......
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