修改项目中的日志框架为log4j2异步形式输出,解决mybatis日志在控制台直接打印等的问题

This commit is contained in:
RenKaiGe
2019-03-11 14:20:03 +08:00
parent ab4ea8fa69
commit 2858a6c47c
31 changed files with 336 additions and 213 deletions

View File

@@ -122,6 +122,8 @@ public class ConfigSourcesService extends BaseService {
*/
public void saveMaatConfig(AuditLogThread thread, long start, List<ConfigCompile> configCompileList,
StringBuffer sb) throws Exception {
long currentTimeMillis = System.currentTimeMillis();
Map<Integer, List<MaatConfig>> maatMap = new HashMap<Integer, List<MaatConfig>>();
Map<Integer, List<MaatConfig>> configMap = new HashMap<Integer, List<MaatConfig>>();
@@ -207,7 +209,6 @@ public class ConfigSourcesService extends BaseService {
}
}
maatConfig.setIpClientRangeMapList(dstMaplList);
if (maatMap.containsKey(service)) {
maatMap.get(service).add(maatConfig);
} else {
@@ -254,6 +255,9 @@ public class ConfigSourcesService extends BaseService {
}
}
logger.info("---------------调用Redis maat配置新增接口---------------------");
long end = System.currentTimeMillis();
logger.warn("执行ConfigSourcesService.saveMaatConfig用时{}毫秒",end-currentTimeMillis);
configRedisService.saveMaatConfig(configMap);
}