修改项目中的日志框架为log4j2异步形式输出,解决mybatis日志在控制台直接打印等的问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user