Package org.jboss.logmanager.config

Examples of org.jboss.logmanager.config.FormatterConfiguration


        } else if (attribute.getName().equals(ENCODING.getName())) {
            final String resolvedValue = (resolveValue ? ENCODING.resolvePropertyValue(context, model) : model.asString());
            configuration.setEncoding(resolvedValue);
        } else if (attribute.getName().equals(FORMATTER.getName())) {
            final String formatterName = configuration.getName();
            final FormatterConfiguration fmtConfig;
            if (logContextConfiguration.getFormatterNames().contains(formatterName)) {
                fmtConfig = logContextConfiguration.getFormatterConfiguration(formatterName);
            } else {
                fmtConfig = logContextConfiguration.addFormatterConfiguration(null, PatternFormatter.class.getName(), formatterName, "pattern");
            }
            final String resolvedValue = (resolveValue ? FORMATTER.resolvePropertyValue(context, model) : model.asString());
            fmtConfig.setPropertyValueString("pattern", resolvedValue);
            configuration.setFormatterName(formatterName);
        } else if (attribute.getName().equals(FILTER_SPEC.getName())) {
            final ModelNode valueNode = (resolveValue ? FILTER_SPEC.resolveModelAttribute(context, model) : model);
            final String resolvedValue = (valueNode.isDefined() ? valueNode.asString() : null);
            configuration.setFilter(resolvedValue);
View Full Code Here


            final String resolvedValue = ENCODING.resolvePropertyValue(context, model);
            final String currentValue = configuration.getEncoding();
            result = (resolvedValue == null ? currentValue == null : resolvedValue.equals(currentValue));
        } else if (attribute.getName().equals(FORMATTER.getName())) {
            final String formatterName = configuration.getName();
            final FormatterConfiguration fmtConfig;
            if (logContextConfiguration.getFormatterNames().contains(formatterName)) {
                fmtConfig = logContextConfiguration.getFormatterConfiguration(formatterName);
                final String resolvedValue = FORMATTER.resolvePropertyValue(context, model);
                final String currentValue = fmtConfig.getPropertyValueString("pattern");
                result = (resolvedValue == null ? currentValue == null : resolvedValue.equals(currentValue));
            } else {
                result = false;
            }
        } else if (attribute.getName().equals(FILTER_SPEC.getName())) {
View Full Code Here

TOP

Related Classes of org.jboss.logmanager.config.FormatterConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.