Create a new LoggedEventFormatter instance with the given template string.
the template string to use for formatting messages.
StaticusingSet up a LoggedEventFormatter with a given template string.
the template string to use for formatting messages.
the LoggedEventFormatter instance for chaining.
LoggedEventFormatter class is responsible for formatting strings based on a template string and a LoggedEvent object. The template can contain placeholders in the format {key} which will be replaced by corresponding values from the LoggedEvent object. It also supports optional blocks in the format [? ... ] which will only be included in the final message if all placeholders within them have corresponding data values. This allows for flexible and dynamic log message formatting based on the available data.