code: public static void reconfigLog4j2(Class<?> pluginClazz,
                                        org.apache.logging.log4j.spi.LoggerContext context) {
          Configuration configuration = ReflectUtil.getFieldValue(context, "configuration");
          PluginManager manager = ReflectUtil.getFieldValue(configuration, "pluginManager");
          PluginType<?> pluginType = manager.getPluginType("properties");
          ReflectUtil.setFieldValue(pluginType, "pluginClass", pluginClazz);
  
          LoggerContext loggerContext = (LoggerContext) context;
          loggerContext.reconfigure();
      }
docs: 使用自定义properties插件替换log4j2的指定context中的内置{@link org.apache.logging.log4j.core.config.PropertiesPlugin properties插件}（log4j2使用）
  @param pluginClazz 插件class
  @param context 要替换配置的context，可以使用LogManager.getContext()获取