Buggy code:
public class LoggingExtension implements Extension { private static final String RESOURCE_NAME = ( LoggingExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static final String SUBSYSTEM_NAME = "logging" ; static final PathElement LOGGING_PROFILE_PATH = PathElement . pathElement ( LOGGING_PROFILE ) ; static final ClassLoaderLogContextSelector CONTEXT_SELECTOR = new ClassLoaderLogContextSelector ( ) ; static final ThreadLocalLogContextSelector THREAD_LOCAL_CONTEXT_SELECTOR = new ThreadLocalLogContextSelector ( LoggingExtension . CONTEXT_SELECTOR ) ; static final GenericSubsystemDescribeHandler DESCRIBE_HANDLER = GenericSubsystemDescribeHandler . create ( LoggingExtension . LoggingChildResourceComparator . INSTANCE ) ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 2 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; private static ModuleIdentifier [ ] LOGGING_API_MODULES = new ModuleIdentifier [ ] { ModuleIdentifier . create ( "org.apache.commons.logging" ) , ModuleIdentifier . create ( "org.apache.log4j" ) , ModuleIdentifier . create ( "org.jboss.logging" ) , ModuleIdentifier . create ( "org.jboss.logging.jul-to-slf4j-stub" ) , ModuleIdentifier . create ( "org.jboss.logmanager" ) , ModuleIdentifier . create ( "org.slf4j" ) , ModuleIdentifier . create ( "org.slf4j.ext" ) , ModuleIdentifier . create ( "org.slf4j.impl" ) } ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... keyPrefix ) { } @ Override public void initialize ( final ExtensionContext context ) { if ( ! ( LogManager . getLogManager ( ) . getClass ( ) . getName ( ) . equals ( org . jboss . logmanager . LogManager . class . getName ( ) ) ) ) { throw MESSAGES . extensionNotInitialized ( ) ; } LogContext . setLogContextSelector ( LoggingExtension . THREAD_LOCAL_CONTEXT_SELECTOR ) ; StdioContext . setStdioContextSelector ( new org . jboss . as . logging . stdio . LogContextStdioContextSelector ( StdioContext . getStdioContext ( ) ) ) ; try { final ModuleLoader moduleLoader = Module . forClass ( LoggingExtension . class ) . getModuleLoader ( ) ; for ( ModuleIdentifier moduleIdentifier : LoggingExtension . LOGGING_API_MODULES ) { try { LoggingExtension . CONTEXT_SELECTOR . addLogApiClassLoader ( moduleLoader . loadModule ( moduleIdentifier ) . getClassLoader ( ) ) ; } catch ( Throwable ignore ) { } } } catch ( Exception ignore ) { } final SubsystemRegistration subsystem = context . registerSubsystem ( LoggingExtension . SUBSYSTEM_NAME , LoggingExtension . MANAGEMENT_API_MAJOR_VERSION , LoggingExtension . MANAGEMENT_API_MINOR_VERSION , LoggingExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( INSTANCE ) ; registration . registerOperationHandler ( DEFINITION , LoggingExtension . DESCRIBE_HANDLER ) ; final ResolvePathHandler resolvePathHandler ; if ( context . getProcessType ( ) . isServer ( ) ) { resolvePathHandler = Builder . of ( context . getPathManager ( ) ) . setParentAttribute ( FILE ) . build ( ) ; } else { resolvePathHandler = null ; } registerSubModels ( registration , resolvePathHandler , true ) ; ApplicationTypeConfig atc = new ApplicationTypeConfig ( LoggingExtension . SUBSYSTEM_NAME , CommonAttributes . LOGGING_PROFILE ) ; final List < AccessConstraintDefinition > accessConstraints = new org . jboss . as . controller . access . constraint . management . ApplicationTypeAccessConstraintDefinition ( atc ) . wrapAsList ( ) ; ResourceDefinition profile = new SimpleResourceDefinition ( LoggingExtension . LOGGING_PROFILE_PATH , LoggingExtension . getResourceDescriptionResolver ( ) , LoggingProfileOperations . ADD_PROFILE , LoggingProfileOperations . REMOVE_PROFILE ) { @ Override public List < AccessConstraintDefinition > getAccessConstraints ( ) { return accessConstraints ; } } ; registerSubModels ( registration . registerSubModel ( profile ) , resolvePathHandler , false ) ; if ( context . isRegisterTransformers ( ) ) { registerTransformers ( subsystem ) ; } <START_BUG> subsystem . registerXMLElementWriter ( LoggingSubsystemParser . INSTANCE ) ; <END_BUG> } private void registerTransformers ( SubsystemRegistration subsystem ) { } @ Override public void initializeParsers ( final ExtensionParsingContext context ) { } private void registerSubModels ( final ManagementResourceRegistration registration , final ResolvePathHandler resolvePathHandler , final boolean includeLegacyAttributes ) { } private static class LoggingResourceDescriptionResolver extends StandardResourceDescriptionResolver { private static final Map < String , String > COMMON_ATTRIBUTE_NAMES = new HashMap < String , String > ( ) ; public LoggingResourceDescriptionResolver ( final String keyPrefix , final String bundleBaseName , final ClassLoader bundleLoader ) { } @ Override public String getResourceAttributeDescription ( final String attributeName , final Locale locale , final ResourceBundle bundle ) { } @ Override public String getResourceAttributeValueTypeDescription ( final String attributeName , final Locale locale , final ResourceBundle bundle , final String ... suffixes ) { } @ Override public String getOperationParameterDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle ) { } @ Override public String getOperationParameterValueTypeDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle , final String ... suffixes ) { } @ Override public String getOperationParameterDeprecatedDescription ( final String operationName , final String paramName , final Locale locale , final ResourceBundle bundle ) { } @ Override public String getResourceAttributeDeprecatedDescription ( final String attributeName , final Locale locale , final ResourceBundle bundle ) { } private String getBundleKey ( final String name ) { } private String getVariableBundleKey ( final String name , final String ... variable ) { } } public static class LoggingChildResourceComparator implements Comparator < PathElement > { static final LoggingExtension . LoggingChildResourceComparator INSTANCE = new LoggingExtension . LoggingChildResourceComparator ( ) ; static final int GREATER = 1 ; static final int EQUAL = 0 ; static final int LESS = - 1 ; @ Override public int compare ( final PathElement o1 , final PathElement o2 ) { } } }

Fix:
subsystem . registerXMLElementWriter ( LoggingSubsystemWriter . INSTANCE ) ;