Pārlūkot izejas kodu

删除无用日志

xusonglin 5 gadi atpakaļ
vecāks
revīzija
897e074cae

+ 0 - 6
src/main/java/com/jkcredit/asychronous/job/ManJob.java

@@ -72,7 +72,6 @@ public class ManJob {
                 e.printStackTrace();
             }
             try {
-                log.info("文件上传 路径:{}", File.separator + dir + File.separator +  endTime.toString() + ".xlsx", fileName);
                 SFTPUtil.upload(host, port, userName, passphrase, File.separator + dir + File.separator +  endTime.toString() + ".xlsx", fileName, keyFilePath);
                 // todo 上传完删除本地文件
                 File localFile = new File(fileName);
@@ -113,16 +112,11 @@ public class ManJob {
         } catch (IOException e) {
             e.printStackTrace();
         }
-//            String fileName = ExcelUtil.export(list, Man.class, localDir,endTime.toString());
-//            log.info("ManExcel:{}", fileName);
-//        SFTPUtil.upload(host, port, userName, passphrase, dir, fileName);
     }
 
     @Scheduled(cron = "0 0/1 * * * ?", zone = "Asia/Shanghai")
     private void downloadFile() {
         try {
-            log.info("下载文件 localDir == " + fileDir);
-            log.info("下载文件 manDownloadPath == " + manDownloadPath);
             SFTPUtil.download(userName, port, host, passphrase, keyFilePath, fileDir, manDownloadPath);
         } catch (Exception e) {
             log.error("下载文件失败,失败原因:{}", e.getMessage());

+ 1 - 1
src/main/java/com/jkcredit/asychronous/process/ManLocationFileProcessor.java

@@ -67,7 +67,7 @@ public class ManLocationFileProcessor implements Processor {
         //系统文件分隔符
         String splitTag = File.separator;
         //文件的绝对路径
-        log.info(fileDir + splitTag + fileName);
+        log.info("manProcess:" + fileDir + splitTag + fileName);
 
         Charge charge = new Charge();
 

+ 1 - 7
src/main/java/com/jkcredit/asychronous/util/SFTPUtil.java

@@ -37,17 +37,13 @@ public class SFTPUtil {
                 } else {
                     jsch.addIdentity(keyFilePath);// 设置私钥
                 }
-                log.info("连接sftp,私钥文件路径:" + keyFilePath);
             }
-            log.info("SFTP Host: " + host + "; UserName:" + userName);
             session = jsch.getSession(userName, host, port);
-            log.debug("Session 已建立.");
             Properties sshConfig = new Properties();
             sshConfig.put("StrictHostKeyChecking", "no");
             session.setConfig(sshConfig);
             session.setConfig("kex", "diffie-hellman-group1-sha1");
             session.connect();
-            log.debug("Session 已连接.");
             channel = (ChannelSftp) session.openChannel("sftp");
             channel.connect(60000);
             log.info("连接到SFTP成功.Host: " + host);
@@ -86,9 +82,8 @@ public class SFTPUtil {
         try {
 //            fileName = "C:\\Users\\Administrator\\Desktop\\ftp\\upload\\1580697240002.xlsx";
 //            channel.put(new FileInputStream(fileName), "/download/1580697240002.xlsx", ChannelSftp.OVERWRITE);
-            log.info("dis == " + dir);
             channel.put(new FileInputStream(fileName), dir, ChannelSftp.OVERWRITE);
-            log.info("上传到sftp成功");
+            log.info("上传到sftp成功,文件名:{}", fileName);
         } catch (Exception e) {
             log.info("上传文件:" + fileName + "失败");
             throw e;
@@ -119,7 +114,6 @@ public class SFTPUtil {
             List<String> files = listFiles(remotePath);
             for (String fileName : files) {
                 output = new FileOutputStream(localPath + "/" + fileName);
-                log.info("下载文件:" + fileName + "开始");
                 channel.get(remotePath + "/" +fileName, output);
                 log.info("下载文件:" + fileName + "成功");
                 delete(remotePath, fileName);