Commit 5d3b53d5 authored by xiaoguang.xu's avatar xiaoguang.xu

optimize : 增加一个包描述.

parent 6b90314e
...@@ -40,26 +40,12 @@ public class LogCallHttpAspect { ...@@ -40,26 +40,12 @@ public class LogCallHttpAspect {
try { try {
HttpServletRequest request = attrs.getRequest(); HttpServletRequest request = attrs.getRequest();
String remoteIP = IPUtil.getRemoteIP(request); String remoteIP = IPUtil.getRemoteIP(request);
this.asyncRecordIt(pjp, result, remoteIP); Object[] args = pjp.getArgs();
LOGGER.info("http api is called,from IP:[{}],args:[{}]", remoteIP, args);
} catch (Exception e) { } catch (Exception e) {
LOGGER.error("打印http请求日志出错", e); LOGGER.error("打印http请求日志出错", e);
} }
} }
return result; return result;
} }
/**
* 异步记录日志
*
* @param pjp
* @param result
* @param remoteIP
*/
private void asyncRecordIt(ProceedingJoinPoint pjp, Object result, String remoteIP) {
Object[] args = pjp.getArgs();
String methodName = pjp.getSignature().getName();
String targetName = pjp.getTarget().getClass().getName();
LOGGER.info("http api is called,from IP:[{}],method :[{}],args:[{}]", remoteIP, targetName.concat(".").concat(methodName), args);
}
} }
/**
* 这个包是给运营系统之类的准备的.
*/
package cn.quantgroup.xyqb.controller.external.backend;
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