docs: public void writeConfiguration(final OperationContext context) {
          final String loggingConfig;
          switch (context.getProcessType()) {
              case DOMAIN_SERVER: {
                  loggingConfig = FileResolver.resolvePath(context, "jboss.server.data.dir", PROPERTIES_FILE);
                  break;
              }
              case STANDALONE_SERVER: {
                  loggingConfig = FileResolver.resolvePath(context, "jboss.server.config.dir", PROPERTIES_FILE);
                  break;
              }
              default: {
                  /*
                  For every case other than domain or standalone servers, (embedded, appclient etc.) this leave loggingConfig
                  unset and returns. Allowing the config to be set here, will result in the respective {standalone|domain}/configuration/
                  logging.properties being overwritten with a basic empty logging template, which may cause unexpected and missing logging
                  output on the next startup. (This is caused in the embedded case by nothing being committed on the LogContext being used.)
                  */
                  return;
              }
          }
          if (loggingConfig == null) {
              LoggingLogger.ROOT_LOGGER.warn(LoggingLogger.ROOT_LOGGER.pathManagerServiceNotStarted());
          } else {
              final File configFile = new File(loggingConfig);
              synchronized (LOCK) {
                  try {
                      // Commit the log context configuration
                      commit();
                      FileOutputStream out = null;
                      try {
                          out = new FileOutputStream(configFile);
                          final FileLock lock = out.getChannel().lock();
                          try {
                              out.write(NOTE_MESSAGE);
                              config.writeConfiguration(out);
                          } finally {
                              // The write should close the stream which would release the lock this check ensures the
                              // lock will be released
                              if (lock.isValid()) {
                                  lock.release();
                              }
                          }
                          LoggingLogger.ROOT_LOGGER.tracef("Logging configuration file '%s' successfully written.", configFile.getAbsolutePath());
                      } catch (IOException e) {
                          throw LoggingLogger.ROOT_LOGGER.failedToWriteConfigurationFile(e, configFile);
                      } finally {
                          safeClose(out);
                      }
                  } finally {
                      forget();
                  }
              }
          }
      }