getSimpleFormatterIgnoring

public static LogMessageFormatter getSimpleFormatterIgnoring(Array<MetadataKey<? extends Object>> extraIgnoredKeys)

Returns a log message formatter which formats log messages in the form:


Log message [CONTEXT key="value" id=42 ]

with context from the log data and scope, merged together in a sequence of key/value pairs after the formatted message. If the log message is long or multi-line, then the context suffix will be formatted on a single separate line.

This differs from the default formatter because it allows the caller to specify additional metadata keys to be omitted from the formatted context. By default the cause is always omitted from the context section, since it's handled separately by most logger backends and almost never expected to be part of the formatted message. Other internal metadata keys may also be suppressed.