3 namespace Drupal\Core\Logger;
6 * Defines an interface for parsing log messages and their placeholders.
8 interface LogMessageParserInterface {
11 * Parses and transforms message and its placeholders to a common format.
13 * For a value to be considered as a placeholder should be in the following
16 * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#12-message
17 * - Drupal specific string placeholder format:
18 * @see \Drupal\Component\Render\FormattableMarkup
20 * Values in PSR3 format will be transformed to
21 * \Drupal\Component\Render\FormattableMarkup format.
23 * @param string $message
24 * The message that contains the placeholders.
25 * If the message is in PSR3 style, it will be transformed to
26 * \Drupal\Component\Render\FormattableMarkup style.
27 * @param array $context
28 * An array that may or may not contain placeholder variables.
31 * An array of the extracted message placeholders.
33 public function parseMessagePlaceholders(&$message, array &$context);