code: public static void reInitLogConfig(String logConfigpath)
  	{
  		try {
  			 LoggerContext context =(LoggerContext)LogManager.getContext(false);
  		     context.setConfigLocation(new File(logConfigpath).toURI());
  		     context.reconfigure(); //重新初始化Log4j2的配置上下文
  		     Logger log=LoggerFactory.getLogger(Log4jUtil.class);
  			 log.info("日志配置重新初始化完成:"+logConfigpath);
  		} catch (Exception e) {
  			e.printStackTrace();
  		}  
  	}
docs: 根据配置文件路径初始化日志配置
  @param logConfigpath