function LoggerController::formatMessage in MongoDB 8
Formats a log message for display.
Parameters
$dblog: An object with at least the message and variables properties
Return value
string
2 calls to LoggerController::formatMessage()
- LoggerController::watchdogEvent in src/
Logger/ LoggerController.php - Display watchdogs entry details in MongoDB.
- LoggerController::watchdogOverview in src/
Logger/ LoggerController.php - Display watchdogs entries in mongodb. @TODO Use theme function. Use exposed filter like dblog.
File
- src/
Logger/ LoggerController.php, line 66 - Controller service for the MongoDB Watchdog reports.
Class
Namespace
Drupal\mongodb\LoggerCode
function formatMessage($dblog) {
// Legacy messages and user specified text
if (!isset($dblog['variables'])) {
return $dblog['message'];
}
// Message to translate with injected variables
return t($dblog['message'], $dblog['variables']);
}