浏览代码

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1年前
父节点
当前提交
2ccdb59f85
共有 1 个文件被更改,包括 3 次插入1 次删除
  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 查看文件

@@ -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");
}
}
//记录最后一个节点位置


正在加载...
取消
保存