pms 2 years ago
parent
commit
12d286dcfb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      mainFactory/src/main/java/org/bfkj/utils/LogUtils.java

+ 3 - 1
mainFactory/src/main/java/org/bfkj/utils/LogUtils.java

@@ -4,6 +4,7 @@ package org.bfkj.utils;
 import org.bfkj.config.AppConfig;
 import org.bfkj.config.ObjectMap;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
@@ -13,6 +14,7 @@ public class LogUtils { // 依据服务编号ID获取服务类型,如果是异
     public static Map<String, List<Object>> logSuccessMapList = new ConcurrentHashMap<>();
     public static Map<String, List<Object>> sourceMapList = new ConcurrentHashMap<>();
 
+    public static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     private static Long deleteTime = 0L;
 
 
@@ -32,7 +34,7 @@ public class LogUtils { // 依据服务编号ID获取服务类型,如果是异
             add(success);
             add(location);
             add(logContent);
-            add(new Date());
+            add(sdf.format(new Date()));
             add(serviceId);
             add(AppConfig.WORK_ID);
             add(Objects.isNull(event) ? null : event.toString());