未验证 提交 9862fe02 编写于 作者: K kezhenxu94 提交者: GitHub

Log harmless exception in DEBUG level (#4156)

* Log harmless exception in DEBUG level

* Log harmless exception in DEBUG level

* Minor refactor to avoid default method
上级 d38a8eaa
......@@ -51,5 +51,7 @@ public interface ILog {
void debug(String format, Object... arguments);
void debug(Throwable t, String format, Object... arguments);
void error(String format);
}
......@@ -78,6 +78,11 @@ public enum NoopLogger implements ILog {
}
@Override
public void debug(final Throwable t, final String format, final Object... arguments) {
}
@Override
public void error(String format) {
......
......@@ -184,6 +184,12 @@ public class PatternLogger implements ILog {
}
}
@Override
public void debug(final Throwable t, final String format, final Object... arguments) {
if (isDebugEnable()) {
logger(LogLevel.DEBUG, replaceParam(format, arguments), t);
}
}
String format(LogLevel level, String message, Throwable t) {
LogEvent logEvent = new LogEvent(level, message, t, targetClass);
......
......@@ -46,7 +46,9 @@ public class ProtectiveShieldMatcher<T> extends ElementMatcher.Junction.Abstract
try {
return this.matcher.matches(target);
} catch (Throwable t) {
logger.warn(t, "Byte-buddy occurs exception when match type.");
if (logger.isDebugEnable()) {
logger.debug(t, "Byte-buddy occurs exception when match type.");
}
return false;
}
}
......
......@@ -48,7 +48,7 @@ collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES:127.0.0.1:11800}
logging.file_name=${SW_LOGGING_FILE_NAME:skywalking-api.log}
# Logging level
logging.level=${SW_LOGGING_LEVEL:DEBUG}
logging.level=${SW_LOGGING_LEVEL:INFO}
# Logging dir
# logging.dir=${SW_LOGGING_DIR:""}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册