Procházet zdrojové kódy

过滤条件增加3

mashengyi před 3 roky
rodič
revize
91bbb1f734

+ 4 - 4
src/main/java/com/jkcredit/invoice/credit/SimpleCORSFilter.java

@@ -220,16 +220,16 @@ public class SimpleCORSFilter implements Filter {
 
             ResponseCode responseCode = checkToken(httpRequest, httpResponse,startTime,flagUuid);
             if (!Objects.equals(responseCode, ResponseCode.SUCCESS)) {
-                log.warn("SimpleCORSFilterWarn = {}", responseCode);
+                log.error("FILE - SimpleCORSFilterError = {}", responseCode + " ,requestURI = {" + httpRequest.getRequestURI() +"}");
                 //httpResponse.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                 httpResponse.setContentType("application/json; charset=utf-8");
                 httpResponse.setCharacterEncoding("utf-8");
                 PrintWriter writer = httpResponse.getWriter();
                 writer.write(new ObjectMapper().writeValueAsString(ApiResult.failure(responseCode)));
-                log.info("[-SimpleCORSFilter-] return result=" + responseCode.toString() + " , param is api="+  api + " , data=" + data + " , appKey=" + appKey + " , appSecret=" + appSecret +  " ,timeCost=" +(System.currentTimeMillis()-startTime) + "ms" +" , flag=" + flagUuid);
+                log.error("[FILE - SimpleCORSFilter-] return result=" + responseCode.toString() + " , param is api="+  api + " , data=" + data + " , appKey=" + appKey + " , appSecret=" + appSecret +  " ,timeCost=" +(System.currentTimeMillis()-startTime) + "ms" +" , flag=" + flagUuid);
                 return;
             }else{
-
+                log.info("SUCCESS - SimpleCORSFilterWarn = {}", responseCode + " ,requestURI = {" + httpRequest.getRequestURI() +"}");
                 // 创建客户唯一标识ID,以当前时间作为前缀,uuid为后缀
                 String requestid = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()) + ","
                         + UUID.randomUUID().toString();
@@ -246,7 +246,7 @@ public class SimpleCORSFilter implements Filter {
                 httpResponse.setCharacterEncoding("utf-8");
                 PrintWriter writer = httpResponse.getWriter();
                 writer.write(new ObjectMapper().writeValueAsString(ApiResult.failure(dataResult)));
-                log.info("[-SimpleCORSFilter-] return result=" + dataResult.toString() + " , param is api="+  api + " , data=" + data + " , appKey=" + appKey + " , appSecret=" + appSecret +  " ,timeCost=" +(System.currentTimeMillis()-startTime) + "ms" +" , flag=" + flagUuid);
+                log.info("[SUCCESS - SimpleCORSFilter-] return result=" + dataResult.toString() + " , param is api="+  api + " , data=" + data + " , appKey=" + appKey + " , appSecret=" + appSecret +  " ,timeCost=" +(System.currentTimeMillis()-startTime) + "ms" +" , flag=" + flagUuid);
                 return;
             }
         }