@Override public LoggerConfiguration getLoggerConfiguration(final String loggerName) { synchronized (LOCK) { return delegate.getLoggerConfiguration(loggerName); } }
@Override public LoggerConfiguration getLoggerConfiguration(final String loggerName) { synchronized (LOCK) { return delegate.getLoggerConfiguration(loggerName); } }
@Override public LoggerConfiguration getLoggerConfiguration(final String loggerName) { synchronized (LOCK) { return delegate.getLoggerConfiguration(loggerName); } }
protected abstract void updateModel(LoggerConfiguration configuration, ModelNode model); }
protected abstract void updateModel(LoggerConfiguration configuration, ModelNode model); }
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final LogContextConfiguration logContextConfiguration, final String name, final ModelNode model) throws OperationFailedException { // Disable the logger before removing it final String loggerName = getLogManagerLoggerName(name); final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingMessages.MESSAGES.loggerNotFound(loggerName)); } logContextConfiguration.removeLoggerConfiguration(loggerName); } };
@Override public final void performRuntime(final OperationContext context, final ModelNode operation, final LogContextConfiguration logContextConfiguration, final String name, final ModelNode model) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(name); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingMessages.MESSAGES.loggerConfigurationNotFound(loggerName)); } performRuntime(context, operation, configuration, loggerName, model); }
@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 public void performRuntime(final OperationContext context, final ModelNode operation, final LogContextConfiguration logContextConfiguration, final String name, final ModelNode model) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(name); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { LoggingLogger.ROOT_LOGGER.tracef("Adding logger '%s' at '%s'", name, LoggingOperations.getAddress(operation)); configuration = logContextConfiguration.addLoggerConfiguration(loggerName); } for (AttributeDefinition attribute : attributes) { handleProperty(attribute, context, model, configuration); } } }
@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 public final void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(context.getCurrentAddressValue()); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.loggerConfigurationNotFound(loggerName)); } performRuntime(context, operation, configuration, loggerName, model); }
@Override public final void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String loggerName = getLogManagerLoggerName(context.getCurrentAddressValue()); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.loggerConfigurationNotFound(loggerName)); } performRuntime(context, operation, configuration, loggerName, model); }
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { // Disable the logger before removing it final String loggerName = getLogManagerLoggerName(context.getCurrentAddressValue()); final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.loggerNotFound(loggerName)); } logContextConfiguration.removeLoggerConfiguration(loggerName); } };
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { // Disable the logger before removing it final String loggerName = getLogManagerLoggerName(context.getCurrentAddressValue()); final LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { throw createOperationFailure(LoggingLogger.ROOT_LOGGER.loggerNotFound(loggerName)); } logContextConfiguration.removeLoggerConfiguration(loggerName); } };
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final String loggerName = getLogManagerLoggerName(name); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { LoggingLogger.ROOT_LOGGER.tracef("Adding logger '%s' at '%s'", name, context.getCurrentAddress()); configuration = logContextConfiguration.addLoggerConfiguration(loggerName); } for (AttributeDefinition attribute : attributes) { handleProperty(attribute, context, model, configuration); } } }
@Override public void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model, final LogContextConfiguration logContextConfiguration) throws OperationFailedException { final String name = context.getCurrentAddressValue(); final String loggerName = getLogManagerLoggerName(name); LoggerConfiguration configuration = logContextConfiguration.getLoggerConfiguration(loggerName); if (configuration == null) { LoggingLogger.ROOT_LOGGER.tracef("Adding logger '%s' at '%s'", name, context.getCurrentAddress()); configuration = logContextConfiguration.addLoggerConfiguration(loggerName); } for (AttributeDefinition attribute : attributes) { handleProperty(attribute, context, model, configuration); } } }
final List<String> assigned = new ArrayList<>(); for (String loggerName : loggerNames) { final LoggerConfiguration c = logContextConfiguration.getLoggerConfiguration(loggerName); if (c != null) { if (c.getHandlerNames().contains(name)) {
private List<String> configureLogger(final Properties properties, final String loggerName) { final LoggerConfiguration loggerConfiguration; if (config.getLoggerNames().contains(loggerName)) { loggerConfiguration = config.getLoggerConfiguration(loggerName); } else { loggerConfiguration = config.addLoggerConfiguration(loggerName);
private void configureLogger(final Properties properties, final String loggerName) { if (config.getLoggerConfiguration(loggerName) != null) {