Class XmlConfiguration

    • Method Detail

      • addAppenderIfAbsent

        public void addAppenderIfAbsent​(Appender appender)
      • subst

        public String subst​(String value,
                            Properties props)
        Substitutes property value for any references in expression.
        Parameters:
        value - value from configuration file, may contain literal text, property references or both
        props - properties.
        Returns:
        evaluated expression, may still contain expressions if unable to expand.
      • setParameter

        public void setParameter​(Element elem,
                                 PropertySetter propSetter,
                                 Properties props)
        Sets a parameter based from configuration file content.
        Parameters:
        elem - param element, may not be null.
        propSetter - property setter, may not be null.
        props - properties
        Since:
        1.2.15
      • parseElement

        public Object parseElement​(Element element,
                                   Properties props,
                                   Class expectedClass)
                            throws Exception
        Creates an object and processes any nested param elements but does not call activateOptions. If the class also supports UnrecognizedElementParser, the parseUnrecognizedElement method will be call for any child elements other than param.
        Parameters:
        element - element, may not be null.
        props - properties
        expectedClass - interface or class expected to be implemented by created class
        Returns:
        created class or null.
        Throws:
        Exception - thrown if the contain object should be abandoned.
        Since:
        1.2.15
      • findAppenderByReference

        public Appender findAppenderByReference​(Element appenderRef)
        Used internally to parse appenders by IDREF element.
      • parseAppender

        public Appender parseAppender​(Element appenderElement)
        Used internally to parse an appender element.
      • parseFilters

        public Filter parseFilters​(Element filterElement)
        Used internally to parse a filter element.
      • parseLayout

        public Layout parseLayout​(Element layoutElement)
        Used internally to parse a layout element.