diff -u b/core/modules/dblog/src/Controller/DbLogController.php b/core/modules/dblog/src/Controller/DbLogController.php --- b/core/modules/dblog/src/Controller/DbLogController.php +++ b/core/modules/dblog/src/Controller/DbLogController.php @@ -262,11 +262,11 @@ ), array( array('data' => $this->t('Location'), 'header' => TRUE), - $this->l($dblog->location, (!empty($dblog->location) ? Url::fromUri($dblog->location) : new Url(''))), + \Drupal::l($dblog->location, (!empty($dblog->location) ? Url::fromUri($dblog->location) : new Url(''))), ), array( array('data' => $this->t('Referrer'), 'header' => TRUE), - $this->l($dblog->referer, (!empty($dblog->referer) ? Url::fromUri($dblog->referer) : new Url(''))), + \Drupal::l($dblog->referer, (!empty($dblog->referer) ? Url::fromUri($dblog->referer) : new Url(''))), ), array( array('data' => $this->t('Message'), 'header' => TRUE), diff -u b/core/modules/dblog/src/Tests/DbLogTest.php b/core/modules/dblog/src/Tests/DbLogTest.php --- b/core/modules/dblog/src/Tests/DbLogTest.php +++ b/core/modules/dblog/src/Tests/DbLogTest.php @@ -128,21 +128,18 @@ * * @param int $count * Number of watchdog entries to generate. - * @param string $type - * (optional) The type of watchdog entry. Defaults to 'custom'. - * @param int $severity - * (optional) The severity of the watchdog entry. Defaults to - * \Drupal\Core\Logger\RfcLogLevel::NOTICE. + * @param array $options + * (optional) An array of options that override the default values. */ - private function generateLogEntries($count, $type = 'custom', $severity = RfcLogLevel::NOTICE) { + private function generateLogEntries($count, $options = array()) { global $base_root; // Prepare the fields to be logged - $log = array( - 'channel' => $type, - 'message' => 'Log entry added to test the dblog row limit.', + $log = $options + array( + 'channel' => 'system', + 'message' => 'Dblog test log message', 'variables' => array(), - 'severity' => $severity, + 'severity' => RfcLogLevel::NOTICE, 'link' => NULL, 'user' => $this->big_user, 'uid' => $this->big_user->id(), @@ -150,7 +147,7 @@ 'referer' => \Drupal::request()->server->get('HTTP_REFERER'), 'ip' => '127.0.0.1', 'timestamp' => REQUEST_TIME, - ); + ); if ($count > 1) { $row_message = $log['message'] . ' Entry #';