function _mongodb_watchdog_format_message in MongoDB 6
Same name and namespace in other branches
- 7 mongodb_watchdog/mongodb_watchdog.admin.inc \_mongodb_watchdog_format_message()
Formats a log message for display.
Parameters
array $dblog: An object with at least the message and variables properties.
Return value
string The formatted message.
2 calls to _mongodb_watchdog_format_message()
- mongodb_watchdog_event in mongodb_watchdog/
mongodb_watchdog.admin.inc - Display watchdogs entry details in MongoDB.
- mongodb_watchdog_overview in mongodb_watchdog/
mongodb_watchdog.admin.inc - Display watchdogs entries in MongoDB.
File
- mongodb_watchdog/
mongodb_watchdog.admin.inc, line 239 - Settings for mongodb. Moved back to module file.
Code
function _mongodb_watchdog_format_message(array $dblog) {
// Legacy messages and user specified text.
if (!isset($dblog['variables'])) {
return $dblog['message'];
}
// Message to translate with injected variables. The message is actually
// supposed to be a template string from code, not a dynamically generated one
// so using it as a parameter for t() is correct.
return t($dblog['message'], $dblog['variables']);
}