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..8930793881 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 @@ -1,29 +1,21 @@ package com.epmet.commons.tools.filter; -import ch.qos.logback.classic.Level; import ch.qos.logback.classic.filter.LevelFilter; 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; -import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DingdingMsgSender; 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; import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; -import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -47,7 +39,7 @@ public class LogMsgSendFilter extends LevelFilter { @Override public FilterReply decide(ILoggingEvent event) { //如果日志级别等于设置的日志级别 则发送消息 - if (event.getLevel().isGreaterOrEqual(Level.ERROR)) { + /* if (event.getLevel().isGreaterOrEqual(Level.ERROR)) { try { getServerInfo(); if (EnvEnum.LOCAL.getName().equals(activeEnv)){ @@ -118,7 +110,7 @@ public class LogMsgSendFilter extends LevelFilter { } catch (Exception e) { logger.warn("decide exception", e); } - } + }*/ //交给其他filter继续向下处理 return super.decide(event);