interface LogMessageParserInterface (View source)

Defines an interface for parsing log messages and their placeholders.

Methods

array
parseMessagePlaceholders(string $message, array $context)

Parses and transforms message and its placeholders to a common format.

Details

array parseMessagePlaceholders(string $message, array $context)

Parses and transforms message and its placeholders to a common format.

For a value to be considered as a placeholder should be in the following formats:

Values in PSR3 format will be transformed to \Drupal\Component\Render\FormattableMarkup format.

Parameters

string $message

The message that contains the placeholders. If the message is in PSR3 style, it will be transformed to \Drupal\Component\Render\FormattableMarkup style.

array $context

An array that may or may not contain placeholder variables.

Return Value

array

An array of the extracted message placeholders.

See also

FormattableMarkup