docs: private LoggingConfigurationService configure(final ResourceRoot root, final VirtualFile configFile, final ClassLoader classLoader, final LogContext logContext) throws DeploymentUnitProcessingException {
          InputStream configStream = null;
          try {
              LoggingLogger.ROOT_LOGGER.debugf("Found logging configuration file: %s", configFile);
  
              // Get the filname and open the stream
              final String fileName = configFile.getName();
              configStream = configFile.openStream();
  
              // Check the type of the configuration file
              if (isLog4jConfiguration(fileName)) {
                  final ClassLoader current = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
                  final LogContext old = logContextSelector.getAndSet(CONTEXT_LOCK, logContext);
                  try {
                      WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(classLoader);
                      if (LOG4J_XML.equals(fileName) || JBOSS_LOG4J_XML.equals(fileName)) {
                          new DOMConfigurator().doConfigure(configStream, org.apache.log4j.JBossLogManagerFacade.getLoggerRepository(logContext));
                      } else {
                          final Properties properties = new Properties();
                          properties.load(new InputStreamReader(configStream, ENCODING));
                          new org.apache.log4j.PropertyConfigurator().doConfigure(properties, org.apache.log4j.JBossLogManagerFacade.getLoggerRepository(logContext));
                      }
                  } finally {
                      logContextSelector.getAndSet(CONTEXT_LOCK, old);
                      WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(current);
                  }
                  return new LoggingConfigurationService(null, resolveRelativePath(root, configFile));
              } else {
                  // Create a properties file
                  final Properties properties = new Properties();
                  properties.load(new InputStreamReader(configStream, ENCODING));
                  // Attempt to see if this is a J.U.L. configuration file
                  if (isJulConfiguration(properties)) {
                      LoggingLogger.ROOT_LOGGER.julConfigurationFileFound(configFile.getName());
                  } else {
                      // Load non-log4j types
                      final PropertyConfigurator propertyConfigurator = new PropertyConfigurator(logContext);
                      propertyConfigurator.configure(properties);
                      return new LoggingConfigurationService(propertyConfigurator.getLogContextConfiguration(), resolveRelativePath(root, configFile));
                  }
              }
          } catch (Exception e) {
              throw LoggingLogger.ROOT_LOGGER.failedToConfigureLogging(e, configFile.getName());
          } finally {
              safeClose(configStream);
          }
          return null;
      }