interface LogMessageParserInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface
- 10 core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface
- 11.x core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface
Defines an interface for parsing log messages and their placeholders.
Hierarchy
- interface \Drupal\Core\Logger\LogMessageParserInterface
Expanded class hierarchy of LogMessageParserInterface
All classes that implement LogMessageParserInterface
2 files declare their use of LogMessageParserInterface
- DbLog.php in core/
modules/ dblog/ src/ Logger/ DbLog.php - SysLog.php in core/
modules/ syslog/ src/ Logger/ SysLog.php
File
-
core/
lib/ Drupal/ Core/ Logger/ LogMessageParserInterface.php, line 8
Namespace
Drupal\Core\LoggerView source
interface LogMessageParserInterface {
/**
* 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:
* - @link https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md#12-message The PSR3 format @endlink
* - The Drupal specific string placeholder format, described in
* \Drupal\Component\Render\FormattableMarkup
*
* Values in PSR3 format will be transformed to
* \Drupal\Component\Render\FormattableMarkup format.
*
* @param 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.
* @param array $context
* An array that may or may not contain placeholder variables.
*
* @return array
* An array of the extracted message placeholders.
*
* @see \Drupal\Component\Render\FormattableMarkup
*/
public function parseMessagePlaceholders(&$message, array &$context);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
LogMessageParserInterface::parseMessagePlaceholders | public | function | Parses and transforms message and its placeholders to a common format. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.