Skip to content

Commit

Permalink
Update CatchLogAspect.java
Browse files Browse the repository at this point in the history
[李小平] #N/A feat: Catching and Logging,修订坏
  • Loading branch information
byd-android-2017 authored Jan 20, 2023
1 parent 15af415 commit 3d73836
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ private void logResponse(long startTime, Object response) {
try {
long endTime = System.currentTimeMillis();
if (log.isDebugEnabled()) {
log.debug("RESPONSE : {}", JSON.toJSONString(response));
log.debug("COST : {}ms", (endTime - startTime));
log.debug("RESPONSE: {}", JSON.toJSONString(response));
log.debug("COST: {}ms", (endTime - startTime));
}
} catch (Exception e) {
//swallow it
log.error("logResponse error : {}", e.getMessage() , e);
log.error("logResponse error: {}", e.getMessage() , e);
}
}

Expand All @@ -90,11 +90,11 @@ private void logRequest(ProceedingJoinPoint joinPoint) {
log.debug("START PROCESSING: {}", joinPoint.getSignature().toShortString());
Object[] args = joinPoint.getArgs();
for (Object arg : args) {
log.debug("REQUEST : {}", JSON.toJSONString(arg, SerializerFeature.IgnoreErrorGetter));
log.debug("REQUEST: {}", JSON.toJSONString(arg, SerializerFeature.IgnoreErrorGetter));
}
} catch (Exception e) {
//swallow it
log.error("logReqeust error : {}", e.getMessage() , e);
log.error("logReqeust error: {}", e.getMessage() , e);
}
}

Expand Down

0 comments on commit 3d73836

Please sign in to comment.