parseBraceFormatTerm

public void parseBraceFormatTerm(MessageBuilder<? extends Object> builder, int index, String message, int termStart, int formatStart, int termEnd)

Parses a single brace format term from a log message into a message template builder. Note that the default brace style parser currently does not handle anything other than the simplest "{n}" forms of parameter specification, and it will treat anything more complex as a parsing error.

A simple example of a positional parameter:

message: "Hello {0} World"
termStart: 6 ───┚  ╿
formatStart: -1    │
termEnd: 9 ────────╯

A more complex example with a trailing format specification:

message: "Hello {0,number,#} World"
termStart: 6 ───┚  ╿        ╿
formatStart: 9 ────╯        │
termEnd: 18 ────────────────╯

Parameters

builder

the message template builder.

index

the zero-based argument index for the parameter.

message

the complete log message string.

termStart

the index of the initial '{' character that starts the term.

formatStart

the index of the optional formatting substring after the first comma (which extends to termEnd - 1) or -1 if there is no formatting substring.

termEnd

the index after the final '}' character that completes this term.