docs: static synchronized LogContext configureLogContext(final File logDir, final File configDir, final String defaultLogFileName, final CommandContext ctx) {
          final LogContext embeddedLogContext = Holder.LOG_CONTEXT;
          final Path bootLog = logDir.toPath().resolve(Paths.get(defaultLogFileName));
          final Path loggingProperties = configDir.toPath().resolve(Paths.get("logging.properties"));
          if (Files.exists(loggingProperties)) {
              WildFlySecurityManager.setPropertyPrivileged("org.jboss.boot.log.file", bootLog.toAbsolutePath().toString());
  
              try (final InputStream in = Files.newInputStream(loggingProperties)) {
                  // Attempt to get the configurator from the root logger
                  Configurator configurator = embeddedLogContext.getAttachment("", Configurator.ATTACHMENT_KEY);
                  if (configurator == null) {
                      configurator = new PropertyConfigurator(embeddedLogContext);
                      final Configurator existing = embeddedLogContext.getLogger("").attachIfAbsent(Configurator.ATTACHMENT_KEY, configurator);
                      if (existing != null) {
                          configurator = existing;
                      }
                  }
                  configurator.configure(in);
              } catch (IOException e) {
                  ctx.printLine(String.format("Unable to configure logging from configuration file %s. Reason: %s", loggingProperties, e.getLocalizedMessage()));
              }
          }
          return embeddedLogContext;
      }