Class EqualsBaseReplacementConverter

    • Field Detail

      • substitutionFormatters

        private final java.util.List<PatternFormatter> substitutionFormatters
      • substitution

        private final java.lang.String substitution
      • testString

        private final java.lang.String testString
    • Constructor Detail

      • EqualsBaseReplacementConverter

        protected EqualsBaseReplacementConverter​(java.lang.String name,
                                                 java.lang.String style,
                                                 java.util.List<PatternFormatter> formatters,
                                                 java.lang.String testString,
                                                 java.lang.String substitution,
                                                 PatternParser parser)
        Construct the converter.
        Parameters:
        name - converter name
        style - converter style
        formatters - The PatternFormatters to generate the text to manipulate.
        testString - The test string.
        substitution - The substitution string.
        parser - The PatternParser.
    • Method Detail

      • format

        public void format​(LogEvent event,
                           java.lang.StringBuilder toAppendTo)
        Formats an event into a string buffer.
        Specified by:
        format in class LogEventPatternConverter
        Parameters:
        event - event to format, may not be null.
        toAppendTo - string buffer to which the formatted event will be appended. May not be null.
      • equals

        protected abstract boolean equals​(java.lang.String str,
                                          java.lang.StringBuilder buff,
                                          int from,
                                          int len)
        Returns true if the specified String equals the specified section of the specified StringBuilder.
        Parameters:
        str - the String to compare
        buff - the StringBuilder to compare a section of
        from - start index in the StringBuilder
        len - length of the section in the StringBuilder
        Returns:
        true if equal, false otherwise
      • parseSubstitution

        void parseSubstitution​(LogEvent event,
                               java.lang.StringBuilder substitutionBuffer)
        Adds the parsed substitution text to the specified buffer.
        Parameters:
        event - the current log event
        substitutionBuffer - the StringBuilder to append the parsed substitution text to