Class BraceStyleMessageParser

  • Direct Known Subclasses:
    DefaultBraceStyleMessageParser

    public abstract class BraceStyleMessageParser
    extends MessageParser
    A specialized MessageParser for processing log messages in the "brace style", as used by MessageFormat. This is an abstract parser which knows how to process and extract place-holder terms at a high level, but does not impose its own semantics on formatting extensions (eg, "{0,number,#.##}").

    Typically you should not subclass this class, but instead subclass DefaultBraceStyleMessageParser, which provides default behavior for simple place-holders.

    • Constructor Detail

      • BraceStyleMessageParser

        public BraceStyleMessageParser()
    • Method Detail

      • unescape

        public final void unescape​(StringBuilder out,
                                   String message,
                                   int start,
                                   int end)
        Description copied from class: MessageParser
        Appends the unescaped literal representation of the given message string (assumed to be escaped according to this parser's escaping rules). This method is designed to be invoked from a callback method in a MessageBuilder instance.
        Specified by:
        unescape in class MessageParser
        Parameters:
        out - the destination into which to append characters
        message - the escaped log message
        start - the start index (inclusive) in the log message
        end - the end index (exclusive) in the log message