diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java index 926a1ccd1e..7c10e7a661 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/filter/LogMsgSendFilter.java @@ -6,7 +6,6 @@ import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; import ch.qos.logback.classic.spi.StackTraceElementProxy; import ch.qos.logback.core.spi.FilterReply; -import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.ThreadLocalConstant; import com.epmet.commons.tools.dto.form.DingTalkTextMsg; import com.epmet.commons.tools.enums.EnvEnum; @@ -16,7 +15,6 @@ import com.epmet.commons.tools.utils.SpringContextUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.slf4j.MDC; import org.springframework.cloud.commons.util.InetUtils; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; @@ -79,7 +77,7 @@ public class LogMsgSendFilter extends LevelFilter { stringBuilder.append("故障时间:").append(DateUtils.format(new Date(event.getTimeStamp()), DateUtils.DATE_TIME_PATTERN)); stringBuilder.append("\n"); - stringBuilder.append("TraceId:").append(MDC.get(AppClientConstant.TRANSACTION_SERIAL_KEY)); + stringBuilder.append("TraceId:").append(Thread.currentThread().getName()); stringBuilder.append("\n"); HttpServletRequest request = getRequest();