Source:
<code>public ServiceContainer start(final List<ModelNode> containerDefinition, ContentProvider contentProvider) throws ExecutionException, InterruptedException, ModuleLoadException { Thread.currentThread().setContextClassLoader(Module.getCallerModule().getClassLoader()); if (java.util.logging.LogManager.getLogManager().getClass().getName().equals("org.jboss.logmanager.LogManager")) { try { Class.forName(org.jboss.logmanager.handlers.ConsoleHandler.class.getName(), true, org.jboss.logmanager.handlers.ConsoleHandler.class.getClassLoader()); } catch (Throwable ignored) { } } Module.registerURLStreamHandlerFactoryModule(Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("org.jboss.vfs"))); ServerEnvironment serverEnvironment = determineEnvironment(WildFlySecurityManager.getSystemPropertiesPrivileged(), WildFlySecurityManager.getSystemEnvironmentPrivileged(), ServerEnvironment.LaunchType.SELF_CONTAINED); final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); final Bootstrap.Configuration configuration = new Bootstrap.Configuration(serverEnvironment); configuration.setConfigurationPersisterFactory( new Bootstrap.ConfigurationPersisterFactory() { @Override public ExtensibleConfigurationPersister createConfigurationPersister(ServerEnvironment serverEnvironment, ExecutorService executorService) { SelfContainedConfigurationPersister persister = new SelfContainedConfigurationPersister(containerDefinition); configuration.getExtensionRegistry().setWriterRegistry(persister); return persister; } <START> }); <END> configuration.setModuleLoader(Module.getBootModuleLoader()); return bootstrap.startup(configuration, Collections.<ServiceActivator>singletonList(new ContentProviderServiceActivator(contentProvider))).get(); }</code><technical_language>Is a reason remove stdout stderr redirecting a logger? written System.out System.err redirected server.log if remove this section</technical_language>

Target:
public ServiceContainer start(final List<ModelNode> containerDefinition, ContentProvider contentProvider) throws ExecutionException, InterruptedException, ModuleLoadException { Thread.currentThread().setContextClassLoader(Module.getCallerModule().getClassLoader()); if (java.util.logging.LogManager.getLogManager().getClass().getName().equals("org.jboss.logmanager.LogManager")) { try { Class.forName(org.jboss.logmanager.handlers.ConsoleHandler.class.getName(), true, org.jboss.logmanager.handlers.ConsoleHandler.class.getClassLoader()); StdioContext.install(); final StdioContext context = StdioContext.create( new NullInputStream(), new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger("stdout"), org.jboss.logmanager.Level.INFO), new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger("stderr"), org.jboss.logmanager.Level.ERROR) ); StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context)); } catch (Throwable ignored) { } } Module.registerURLStreamHandlerFactoryModule(Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("org.jboss.vfs"))); ServerEnvironment serverEnvironment = determineEnvironment(WildFlySecurityManager.getSystemPropertiesPrivileged(), WildFlySecurityManager.getSystemEnvironmentPrivileged(), ServerEnvironment.LaunchType.SELF_CONTAINED); final Bootstrap bootstrap = Bootstrap.Factory.newInstance(); final Bootstrap.Configuration configuration = new Bootstrap.Configuration(serverEnvironment); configuration.setConfigurationPersisterFactory( new Bootstrap.ConfigurationPersisterFactory() { @Override public ExtensibleConfigurationPersister createConfigurationPersister(ServerEnvironment serverEnvironment, ExecutorService executorService) { SelfContainedConfigurationPersister persister = new SelfContainedConfigurationPersister(containerDefinition); configuration.getExtensionRegistry().setWriterRegistry(persister); return persister; } }); configuration.setModuleLoader(Module.getBootModuleLoader()); return bootstrap.startup(configuration, Collections.<ServiceActivator>singletonList(new ContentProviderServiceActivator(contentProvider))).get(); }