|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.fr.design.mainframe.messagecollect; |
|
|
|
|
|
|
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.mainframe.errorinfo.ErrorInfo; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
@ -7,6 +8,9 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
import java.util.concurrent.Executors; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @author hades |
|
|
|
@ -17,6 +21,7 @@ public class StartErrorMessageCollector {
|
|
|
|
|
|
|
|
|
|
private static final StartErrorMessageCollector INSTANCE = new StartErrorMessageCollector(); |
|
|
|
|
|
|
|
|
|
private ExecutorService executorService = Executors.newSingleThreadExecutor(new NamedThreadFactory(StartErrorMessageCollector.this.getClass())); |
|
|
|
|
private String uuid; |
|
|
|
|
private String activeKey; |
|
|
|
|
|
|
|
|
@ -42,6 +47,13 @@ public class StartErrorMessageCollector {
|
|
|
|
|
errorInfo.saveAsJSON(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 异步记录 |
|
|
|
|
*/ |
|
|
|
|
public void asyncRecord(String id, String msg, String detail) { |
|
|
|
|
executorService.submit(() -> record(id, msg, detail)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void record(String id, String msg) { |
|
|
|
|
record(id, msg, StringUtils.EMPTY); |
|
|
|
|
} |
|
|
|
|