Browse Source

删除多余的e.printStackTrace();

zhujinghui 4 years ago
parent
commit
a723f555c0
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/main/java/com/example/demo/util/FileUtils.java

+ 3 - 3
src/main/java/com/example/demo/util/FileUtils.java

@@ -380,7 +380,7 @@ public class FileUtils {
             if (inputStream != null) {
                 inputStream.close();
             }
-            System.out.println("info:" + url + " download success");
+            log.info("info:" + url + " download success");
         } catch(FileNotFoundException e){
             return false;
         } catch (IOException e) {
@@ -390,14 +390,14 @@ public class FileUtils {
                 try {
                     fos.close();
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    log.error("下载文件异常", e);
                 }
             }
             if (inputStream != null) {
                 try {
                     inputStream.close();
                 } catch (IOException e) {
-                    e.printStackTrace();
+                    log.error("下载文件异常", e);
                 }
             }
         }