Selaa lähdekoodia

upgrade version

xuxueli 5 vuotta sitten
vanhempi
commit
393cb75933

+ 4 - 1
xxl-job-admin/src/main/java/com/xxl/job/admin/core/util/FtlUtil.java Näytä tiedosto

@@ -4,6 +4,8 @@ import freemarker.ext.beans.BeansWrapper;
4 4
 import freemarker.ext.beans.BeansWrapperBuilder;
5 5
 import freemarker.template.Configuration;
6 6
 import freemarker.template.TemplateHashModel;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
7 9
 
8 10
 /**
9 11
  * ftl util
@@ -11,6 +13,7 @@ import freemarker.template.TemplateHashModel;
11 13
  * @author xuxueli 2018-01-17 20:37:48
12 14
  */
13 15
 public class FtlUtil {
16
+    private static Logger logger = LoggerFactory.getLogger(FtlUtil.class);
14 17
 
15 18
     private static BeansWrapper wrapper = new BeansWrapperBuilder(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS).build();     //BeansWrapper.getDefaultInstance();
16 19
 
@@ -20,7 +23,7 @@ public class FtlUtil {
20 23
             TemplateHashModel fileStatics = (TemplateHashModel) staticModels.get(packageName);
21 24
             return fileStatics;
22 25
         } catch (Exception e) {
23
-            e.printStackTrace();
26
+            logger.error(e.getMessage(), e);
24 27
         }
25 28
         return null;
26 29
     }

+ 1 - 1
xxl-job-core/src/main/java/com/xxl/job/core/util/XxlJobRemotingUtil.java Näytä tiedosto

@@ -98,7 +98,7 @@ public class XxlJobRemotingUtil {
98 98
                 }
99 99
                 return returnT;
100 100
             } catch (Exception e) {
101
-                e.printStackTrace();
101
+                logger.error(e.getMessage(), e);
102 102
                 return new ReturnT<String>(ReturnT.FAIL_CODE, "xxl-rpc remoting response content invalid("+ resultJson +"), for url : " + url);
103 103
             }
104 104