@Override public List<String> getFormatterNames() { synchronized (LOCK) { return delegate.getFormatterNames(); } }
@Override public List<String> getFormatterNames() { synchronized (LOCK) { return delegate.getFormatterNames(); } }
@Override public List<String> getFormatterNames() { synchronized (LOCK) { return delegate.getFormatterNames(); } }
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final LogContextConfiguration logContextConfiguration, final String name, final ModelNode model) throws OperationFailedException { // Validating wouldn't work until the LogContextConfiguration.commit() happens as handlers could still be // named as attached removed the check for this reason. // Remove the handler logContextConfiguration.removeHandlerConfiguration(name); // Remove the formatter if there is one if (logContextConfiguration.getFormatterNames().contains(name)) { logContextConfiguration.removeFormatterConfiguration(name); } // Remove the POJO if it exists if (logContextConfiguration.getPojoNames().contains(name)) { logContextConfiguration.removePojoConfiguration(name); } } };
if (logContextConfiguration.getFormatterNames().contains(name) && !model.hasDefined(NAMED_FORMATTER.getName())) { logContextConfiguration.removeFormatterConfiguration(name);
if (logContextConfiguration.getFormatterNames().contains(name) && !model.hasDefined(NAMED_FORMATTER.getName())) { logContextConfiguration.removeFormatterConfiguration(name);
writeFilterConfiguration(out, config.getFilterConfiguration(filterName), writeExpressions); final List<String> allFormatterNames = config.getFormatterNames(); final ArrayList<String> explicitFormatterNames = new ArrayList<String>(allFormatterNames); explicitFormatterNames.removeAll(implicitFormatters);
final List<String> configuredFormatters = logContextConfiguration.getFormatterNames(); configuredFormatters.removeAll(resource.getChildrenNames(PatternFormatterResourceDefinition.NAME)); configuredFormatters.removeAll(resource.getChildrenNames(CustomFormatterResourceDefinition.NAME));
final List<String> configuredFormatters = logContextConfiguration.getFormatterNames(); configuredFormatters.removeAll(resource.getChildrenNames(PatternFormatterResourceDefinition.NAME)); configuredFormatters.removeAll(resource.getChildrenNames(CustomFormatterResourceDefinition.NAME));
private boolean configureFormatter(final Properties properties, final String formatterName) { final String className = getStringProperty(properties, getKey(FORMATTER, formatterName)); if (className == null) { printError("Formatter %s is not defined%n", formatterName); return false; } final FormatterConfiguration configuration; if (config.getFormatterNames().contains(formatterName)) { configuration = config.getFormatterConfiguration(formatterName); } else { configuration = config.addFormatterConfiguration(getStringProperty(properties, getKey(FORMATTER, formatterName, MODULE)), className, formatterName, getStringCsvArray(properties, getKey(FORMATTER, formatterName, CONSTRUCTOR_PROPERTIES))); } final String[] postConfigurationMethods = getStringCsvArray(properties, getKey(FORMATTER, formatterName, POST_CONFIGURATION)); configuration.setPostConfigurationMethods(postConfigurationMethods); configureProperties(properties, configuration, getKey(FORMATTER, formatterName)); return true; }
final String formatterName = configuration.getName(); final FormatterConfiguration fmtConfig; if (logContextConfiguration.getFormatterNames().contains(formatterName)) { fmtConfig = logContextConfiguration.getFormatterConfiguration(formatterName); final String resolvedValue = FORMATTER.resolvePropertyValue(context, model);
if (logContextConfiguration.getFormatterNames().contains(formatterName)) { fmtConfig = logContextConfiguration.getFormatterConfiguration(formatterName); final String resolvedValue = FORMATTER.resolvePropertyValue(context, model);
if (formatterName != null) { if (config.getFormatterNames().contains(handler.getFormatterName())) { writeProperty(out, prefix, "formatter", formatterName); implicitFormatters.add(handler.getFormatterName());
final String formatterName = configuration.getName(); final FormatterConfiguration fmtConfig; if (logContextConfiguration.getFormatterNames().contains(formatterName)) { fmtConfig = logContextConfiguration.getFormatterConfiguration(formatterName); } else {
/** * Registers the deployment resources needed. * * @param deploymentResourceSupport the deployment resource support * @param service the service, which may be {@code null}, used to find the resource names that need to be registered */ public static void registerDeploymentResource(final DeploymentResourceSupport deploymentResourceSupport, final LoggingConfigurationService service) { final PathElement base = PathElement.pathElement("configuration", service.getConfiguration()); deploymentResourceSupport.getDeploymentSubModel(LoggingExtension.SUBSYSTEM_NAME, base); final LogContextConfiguration configuration = service.getValue(); // Register the child resources if the configuration is not null in cases where a log4j configuration was used if (configuration != null) { registerDeploymentResource(deploymentResourceSupport, base, HANDLER, configuration.getHandlerNames()); registerDeploymentResource(deploymentResourceSupport, base, LOGGER, configuration.getLoggerNames()); registerDeploymentResource(deploymentResourceSupport, base, FORMATTER, configuration.getFormatterNames()); registerDeploymentResource(deploymentResourceSupport, base, FILTER, configuration.getFilterNames()); registerDeploymentResource(deploymentResourceSupport, base, POJO, configuration.getPojoNames()); registerDeploymentResource(deploymentResourceSupport, base, ERROR_MANAGER, configuration.getErrorManagerNames()); } }
for (String name : logContextConfiguration.getFormatterNames()) { logContextConfiguration.removeFormatterConfiguration(name);
/** * Registers the deployment resources needed. * * @param deploymentResourceSupport the deployment resource support * @param service the service, which may be {@code null}, used to find the resource names that need to be registered */ public static void registerDeploymentResource(final DeploymentResourceSupport deploymentResourceSupport, final LoggingConfigurationService service) { final PathElement base = PathElement.pathElement("configuration", service.getConfiguration()); deploymentResourceSupport.getDeploymentSubModel(LoggingExtension.SUBSYSTEM_NAME, base); final LogContextConfiguration configuration = service.getValue(); // Register the child resources if the configuration is not null in cases where a log4j configuration was used if (configuration != null) { registerDeploymentResource(deploymentResourceSupport, base, HANDLER, configuration.getHandlerNames()); registerDeploymentResource(deploymentResourceSupport, base, LOGGER, configuration.getLoggerNames()); registerDeploymentResource(deploymentResourceSupport, base, FORMATTER, configuration.getFormatterNames()); registerDeploymentResource(deploymentResourceSupport, base, FILTER, configuration.getFilterNames()); registerDeploymentResource(deploymentResourceSupport, base, POJO, configuration.getPojoNames()); registerDeploymentResource(deploymentResourceSupport, base, ERROR_MANAGER, configuration.getErrorManagerNames()); } }
for (String name : logContextConfiguration.getFormatterNames()) { logContextConfiguration.removeFormatterConfiguration(name);
for (String s4 : logContextConfiguration.getFormatterNames()) { logContextConfiguration.removeFormatterConfiguration(s4);
for (String s4 : logContextConfiguration.getFormatterNames()) { logContextConfiguration.removeFormatterConfiguration(s4);