code: public static ConfigurationPersistence getOrCreateConfigurationPersistence(final LogContext logContext) {
          final Logger root = logContext.getLogger(CommonAttributes.ROOT_LOGGER_NAME);
          final ConfigurationPersistence result;
          synchronized (LOCK) {
              Configurator configurator = root.getAttachment(Configurator.ATTACHMENT_KEY);
              if (configurator == null) {
                  configurator = new ConfigurationPersistence(logContext);
                  Configurator existing = root.attachIfAbsent(Configurator.ATTACHMENT_KEY, configurator);
                  if (existing != null) {
                      configurator = existing;
                  }
              }
              if (configurator instanceof ConfigurationPersistence) {
                  // We have the correct configurator
                  result = (ConfigurationPersistence) configurator;
              } else if (configurator instanceof PropertyConfigurator) {
                  // Create a new configurator delegating to the configurator found
                  result = new ConfigurationPersistence((PropertyConfigurator) configurator);
                  root.attach(Configurator.ATTACHMENT_KEY, result);
              } else {
                  // An unknown configurator, log a warning and replace
                  LoggingLogger.ROOT_LOGGER.replacingConfigurator(configurator);
                  result = new ConfigurationPersistence(logContext);
                  root.attach(Configurator.ATTACHMENT_KEY, result);
              }
          }
          return result;
      }
docs: Gets the property configurator. If the {@link ConfigurationPersistence} does not exist a new one is created.
  
  @param logContext the log context used to find the property configurator or to attach it to.
  
  @return the property configurator