@Override public List<String> getLoggerNames() { synchronized (LOCK) { return delegate.getLoggerNames(); } }
@Override public List<String> getLoggerNames() { synchronized (LOCK) { return delegate.getLoggerNames(); } }
@Override public List<String> getLoggerNames() { synchronized (LOCK) { return delegate.getLoggerNames(); } }
@Override protected boolean applyUpdate(final OperationContext context, final String attributeName, final String addressName, final ModelNode value, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(addressName); if (logContextConfiguration.getLoggerNames().contains(loggerName)) { final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (LEVEL.getName().equals(attributeName)) { handleProperty(LEVEL, context, value, configuration, false); } else if (FILTER.getName().equals(attributeName)) { // Filter should be replaced by the filter-spec in the super class handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (FILTER_SPEC.getName().equals(attributeName)) { handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (HANDLERS.getName().equals(attributeName)) { handleProperty(HANDLERS, context, value, configuration, false); } else if (USE_PARENT_HANDLERS.getName().equals(attributeName)) { handleProperty(USE_PARENT_HANDLERS, context, value, configuration, false); } } return false; }
@Override protected boolean applyUpdate(final OperationContext context, final String attributeName, final String addressName, final ModelNode value, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(addressName); if (logContextConfiguration.getLoggerNames().contains(loggerName)) { final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (LEVEL.getName().equals(attributeName)) { handleProperty(LEVEL, context, value, configuration, false); } else if (FILTER.getName().equals(attributeName)) { // Filter should be replaced by the filter-spec in the super class handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (FILTER_SPEC.getName().equals(attributeName)) { handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (HANDLERS.getName().equals(attributeName)) { handleProperty(HANDLERS, context, value, configuration, false); } else if (USE_PARENT_HANDLERS.getName().equals(attributeName)) { handleProperty(USE_PARENT_HANDLERS, context, value, configuration, false); } } return false; }
@Override protected boolean applyUpdate(final OperationContext context, final String attributeName, final String addressName, final ModelNode value, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(addressName); if (logContextConfiguration.getLoggerNames().contains(loggerName)) { final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (LEVEL.getName().equals(attributeName)) { handleProperty(LEVEL, context, value, configuration, false); } else if (FILTER.getName().equals(attributeName)) { // Filter should be replaced by the filter-spec in the super class handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (FILTER_SPEC.getName().equals(attributeName)) { handleProperty(FILTER_SPEC, context, value, configuration, false); } else if (HANDLERS.getName().equals(attributeName)) { handleProperty(HANDLERS, context, value, configuration, false); } else if (USE_PARENT_HANDLERS.getName().equals(attributeName)) { handleProperty(USE_PARENT_HANDLERS, context, value, configuration, false); } } return false; } }
final String name = context.getCurrentAddressValue(); final List<String> loggerNames = logContextConfiguration.getLoggerNames(); final List<String> assigned = new ArrayList<>(); for (String loggerName : loggerNames) {
final String name = context.getCurrentAddressValue(); final List<String> loggerNames = logContextConfiguration.getLoggerNames(); final List<String> assigned = new ArrayList<>(); for (String loggerName : loggerNames) {
final Set<String> implicitFormatters = new HashSet<String>(); final Set<String> implicitErrorManagers = new HashSet<String>(); final List<String> loggerNames = config.getLoggerNames(); writePropertyComment(out, "Additional loggers to configure (the root logger is always configured)"); writeProperty(out, "loggers", toCsvString(loggerNames));
final Collection<String> loggersToRemove = config.getLoggerNames(); loggersToRemove.remove(""); loggersToRemove.removeAll(Arrays.asList(loggerNames));
final List<String> configuredLoggerNames = logContextConfiguration.getLoggerNames();
final List<String> configuredLoggerNames = logContextConfiguration.getLoggerNames();
final List<String> configuredLoggerNames = logContextConfiguration.getLoggerNames();
private List<String> configureLogger(final Properties properties, final String loggerName) { final LoggerConfiguration loggerConfiguration; if (config.getLoggerNames().contains(loggerName)) { loggerConfiguration = config.getLoggerConfiguration(loggerName); } else {
private static void clearLogContext(final LogContextConfiguration logContextConfiguration) { try { for (String name : logContextConfiguration.getLoggerNames()) { logContextConfiguration.removeLoggerConfiguration(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()); } }
/** * 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()); } }
private static void clearLogContext(final LogContextConfiguration logContextConfiguration) { try { for (String name : logContextConfiguration.getLoggerNames()) { logContextConfiguration.removeLoggerConfiguration(name);
for (String s1 : logContextConfiguration.getLoggerNames()) { logContextConfiguration.removeLoggerConfiguration(s1);
for (String s1 : logContextConfiguration.getLoggerNames()) { logContextConfiguration.removeLoggerConfiguration(s1);