You are here

function _mongodb_watchdog_format_message in MongoDB 7

Same name and namespace in other branches
  1. 6 mongodb_watchdog/mongodb_watchdog.admin.inc \_mongodb_watchdog_format_message()

Formats a log message for display.

Parameters

object $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 276
Settings for mongodb. Moved back to module file.

Code

function _mongodb_watchdog_format_message($dblog) {

  // Legacy messages and user specified text.
  if (!isset($dblog['variables'])) {
    return $dblog['message'];
  }

  // Message to translate with injected variables.
  // phpcs:ignore
  return t($dblog['message'], $dblog['variables']);
}