code: private void reConfigureAsynchronously() {
          refreshCount.incrementAndGet();
          if (pendingRefreshes.incrementAndGet() == 1) {
              executorPool.submit(new Runnable() {
                  @Override
                  public void run() {
                      do {
                          try {
                              Thread.sleep(MIN_DELAY_BETWEEN_REFRESHES);
                              logger.info("Configuring log4j dynamically");
                              reconfigure();
                          } 
                          catch (Exception th) {
                              logger.error("Cannot dynamically configure log4j :", th);
                          }
                      } while (0 != pendingRefreshes.getAndSet(0));
                  }
              });
          }
      }
docs: Refresh the configuration asynchronously