fix: 优化日志

dev
huangfeng 9 months ago
parent b059da1d20
commit 4eb486e7ed

@ -42,14 +42,14 @@ public class AmpliDownloadTask {
public void downloadAll() { public void downloadAll() {
List<RemoteConfig> configList = configService.listAll(); List<RemoteConfig> configList = configService.listAll();
if (!CollectionUtils.isEmpty(configList)) { if (!CollectionUtils.isEmpty(configList)) {
log.info("SftpDownloadTask.downloadAll 开始."); log.info("AmpliDownloadTask.downloadAll 开始.");
try { try {
for (RemoteConfig config : configList) { for (RemoteConfig config : configList) {
this.downloadServer(config); this.downloadServer(config);
} }
log.info("SftpDownloadTask.downloadAll 结束."); log.info("AmpliDownloadTask.downloadAll 结束.");
} catch (Exception e) { } catch (Exception e) {
log.error("SftpDownloadTask.downloadAll error.", e); log.error("AmpliDownloadTask.downloadAll error.", e);
String str = "SFTP下载文件异常: " + e.getMessage(); String str = "SFTP下载文件异常: " + e.getMessage();
webSocketServer.sendMessage(str); webSocketServer.sendMessage(str);
dingTalkPushUtil.pushText(str); dingTalkPushUtil.pushText(str);
@ -74,7 +74,7 @@ public class AmpliDownloadTask {
this.downloadPath(remotePath, config, sftpTool); this.downloadPath(remotePath, config, sftpTool);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("SftpDownloadTask.downloadServer error.", e); log.error("AmpliDownloadTask.downloadServer error.", e);
String str = "SFTP下载文件异常: " + e.getMessage(); String str = "SFTP下载文件异常: " + e.getMessage();
webSocketServer.sendMessage(str); webSocketServer.sendMessage(str);
dingTalkPushUtil.pushText(str); dingTalkPushUtil.pushText(str);

Loading…
Cancel
Save