|
@@ -1,7 +1,5 @@
|
|
package cn.com.qmth.examcloud.service.core;
|
|
package cn.com.qmth.examcloud.service.core;
|
|
|
|
|
|
-import java.util.UUID;
|
|
|
|
-
|
|
|
|
import org.slf4j.MDC;
|
|
import org.slf4j.MDC;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
@@ -35,10 +33,10 @@ public class Application {
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(Application.class);
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(Application.class);
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
public static void main(String[] args) throws Exception {
|
|
- // 设置主线程埋点跟踪链
|
|
|
|
|
|
+
|
|
if (LOG instanceof SLF4JImpl) {
|
|
if (LOG instanceof SLF4JImpl) {
|
|
- String traceID = UUID.randomUUID().toString().replace("-", "");
|
|
|
|
- MDC.put("TRACE_ID", traceID);
|
|
|
|
|
|
+ // 设置主线程埋点跟踪链
|
|
|
|
+ MDC.put("TRACE_ID", Thread.currentThread().getName());
|
|
}
|
|
}
|
|
SpringApplication.run(Application.class, args);
|
|
SpringApplication.run(Application.class, args);
|
|
}
|
|
}
|