|
|
@ -25,6 +25,7 @@ public class StartErrorMessageCollector { |
|
|
|
private String uuid; |
|
|
|
private String uuid; |
|
|
|
private String activeKey; |
|
|
|
private String activeKey; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean extraJudgeStart = false; |
|
|
|
|
|
|
|
|
|
|
|
public static StartErrorMessageCollector getInstance() { |
|
|
|
public static StartErrorMessageCollector getInstance() { |
|
|
|
return INSTANCE; |
|
|
|
return INSTANCE; |
|
|
@ -42,7 +43,7 @@ public class StartErrorMessageCollector { |
|
|
|
errorInfo.setLogid(id); |
|
|
|
errorInfo.setLogid(id); |
|
|
|
errorInfo.setLog(msg); |
|
|
|
errorInfo.setLog(msg); |
|
|
|
errorInfo.setStackTrace(detail); |
|
|
|
errorInfo.setStackTrace(detail); |
|
|
|
errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup()); |
|
|
|
errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup() || extraJudgeStart); |
|
|
|
errorInfo.setRemote(!WorkContext.getCurrent().isLocal()); |
|
|
|
errorInfo.setRemote(!WorkContext.getCurrent().isLocal()); |
|
|
|
errorInfo.saveAsJSON(); |
|
|
|
errorInfo.saveAsJSON(); |
|
|
|
} |
|
|
|
} |
|
|
@ -51,10 +52,20 @@ public class StartErrorMessageCollector { |
|
|
|
* 异步记录 |
|
|
|
* 异步记录 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void asyncRecord(String id, String msg, String detail) { |
|
|
|
public void asyncRecord(String id, String msg, String detail) { |
|
|
|
executorService.submit(() -> record(id, msg, detail)); |
|
|
|
executorService.submit(() -> { |
|
|
|
|
|
|
|
record(id, msg, detail); |
|
|
|
|
|
|
|
StartErrorMessageCollector.getInstance().setExtraJudgeStart(false); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void record(String id, String msg) { |
|
|
|
public void record(String id, String msg) { |
|
|
|
record(id, msg, StringUtils.EMPTY); |
|
|
|
record(id, msg, StringUtils.EMPTY); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setExtraJudgeStart(boolean extraJudgeStart) { |
|
|
|
|
|
|
|
this.extraJudgeStart = extraJudgeStart; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|