|
@@ -1,5 +1,7 @@
|
|
|
package com.qs.mp.framework.web.exception;
|
|
|
|
|
|
+import com.qs.mp.common.utils.LogUtil;
|
|
|
+import com.qs.mp.common.utils.http.HttpHelper;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -17,7 +19,7 @@ import com.qs.mp.common.utils.StringUtils;
|
|
|
|
|
|
/**
|
|
|
* 全局异常处理器
|
|
|
- *
|
|
|
+ *
|
|
|
* @author ygp
|
|
|
*/
|
|
|
@RestControllerAdvice
|
|
@@ -66,7 +68,7 @@ public class GlobalExceptionHandler
|
|
|
public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request)
|
|
|
{
|
|
|
String requestURI = request.getRequestURI();
|
|
|
- log.error("请求地址'{}',发生未知异常.", requestURI, e);
|
|
|
+ LogUtil.error(log, e, "请求地址:{0},请求参数:{1}发生未知异常.", new Object[]{requestURI, HttpHelper.getBodyString(request)});
|
|
|
return AjaxResult.error(e.getMessage());
|
|
|
}
|
|
|
|