Browse Source

Merge remote-tracking branch 'origin/master'

master
CMM 1 year ago
parent
commit
2ccdb59f85
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java

+ 3
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CommonLogTask.java View File

@@ -90,7 +90,7 @@ public class CommonLogTask {
commonLog.setActionTime(df.format(optLog.getStartTime()));
commonLog.setActionDuration(optLog.getConsumingTime());
commonLog.setActionStatus(0);
commonLog.setAppCode("");
commonLog.setAppCode("A331101453557202109017383");
//判断当天日志文件是否存在
DateTimeFormatter dfNow = DateTimeFormatter.ofPattern("yyyyMMdd");
String fileName = LOG_RECORD_ADDRESS + LOG_FILE + dfNow.format(LocalDateTime.now()) + ".log";
@@ -102,11 +102,13 @@ public class CommonLogTask {
//写入通用规则
FileWriter writer = new FileWriter(fileName);
writer.append(JSONUtil.toJsonStr(commonLog));
writer.append("\n");
if (commonLog.getActionType() == 3){
CommonLog commonLogEnd = new CommonLog();
BeanUtil.copyProperties(commonLog,commonLogEnd);
commonLogEnd.setActionType(4);
writer.append(JSONUtil.toJsonStr(commonLogEnd));
writer.append("\n");
}
}
//记录最后一个节点位置


Loading…
Cancel
Save