Commit b899a492 by huangfusuper

改变邮件日志显示格式

parent fac8a599
......@@ -6,13 +6,13 @@ spring:
password: 123456
mail:
host: smtp.163.com #我自己的SMTP服务器地
username: huangfusuper@163.com #登录用户名
password: huangfu0110 #授权密码
host: smtp.163.com #���Լ���SMTP��������ַ
username: huangfusuper@163.com #��¼�û���
password: huangfu0110 #��Ȩ����
default-encoding: UTF-8
protocol: smtp #协
protocol: smtp ��
properties:
from: huangfusuper@163.com #真实邮箱
from: huangfusuper@163.com #��ʵ����
mybatis:
mapper-locations: /mapper/*.xml
......@@ -26,3 +26,8 @@ myth-rpc:
logging:
path: /data/mythjob
file: myth_log_file
file:
system:
ip: 10.0.120.2
port: 88
\ No newline at end of file
......@@ -12,6 +12,7 @@ import com.byit.service.RunRecordingService;
import com.byit.util.TimeFormatUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.sql.DataSource;
......@@ -45,6 +46,19 @@ public class RunRecordingScanHelper {
*/
public static final String SUCCESS_DONE = "3";
/**
* 文件服务器ip
*/
@Value("${file.system.ip}")
private String fileSystemIp;
/**
* 文件服务器端口号
*/
@Value("${file.system.port}")
private String fileSystemPort;
private static final String FILE_SYSTEM_PRE="http://";
private DataSource dataSource;
private final EmailAlarmService emailAlarmService;
......@@ -239,6 +253,11 @@ public class RunRecordingScanHelper {
jobTaskRunLogs.forEach(jobTaskRunLog -> {
long timeConsuming = jobTaskRunLog.getEndTime().getTime() - jobTaskRunLog.getStartTime().getTime();
log.info("######################{}#####################3",timeConsuming);
/*
* String iframeHtml = "<iframe src='%s'></iframe>";
* String logFilePath = FILE_SYSTEM_PRE+fileSystemIp+":"+fileSystemPort+"/"+jobTaskRunLog.getLogRemotelyPath();
* String logFileUrl = String.format(iframeHtml,logFilePath);
*/
stringBuilder.append("<tr align='center'>")
.append(String.format("<td>%s</td>", jobTaskRunLog.getNodeName()))
.append(String.format("<td>%s</td>", DateUtil.format(jobTaskRunLog.getStartTime(), DATE_FORMAT)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment