忽略错误

This commit is contained in:
zhou-hao 2020-05-15 11:37:28 +08:00
parent af5d3a1f53
commit f3602dd179
1 changed files with 2 additions and 3 deletions

View File

@ -59,7 +59,7 @@ public class SystemLoggingAppender extends UnsynchronizedAppenderBase<ILoggingEv
String gitLocation = null;
String mavenModule = null;
try {
Class clazz = Class.forName(element.getClassName());
Class<?> clazz = Class.forName(element.getClassName());
ModuleUtils.ModuleInfo moduleInfo = ModuleUtils.getModuleByClass(clazz);
if (!StringUtils.isEmpty(moduleInfo.getGitRepository())) {
StringBuilder javaSb = new StringBuilder();
@ -73,8 +73,7 @@ public class SystemLoggingAppender extends UnsynchronizedAppenderBase<ILoggingEv
gitLocation = javaSb.toString();
}
mavenModule = moduleInfo.getArtifactId();
} catch (Exception e) {
log.warn("记录系统日志时,加载类:{}错误。{}", element.getClassName(), e);
} catch (Exception ignore) {
}
Map<String, String> context = new HashMap<>(staticContext);
Map<String, String> mdc = MDC.getCopyOfContextMap();