diff --git a/core/lib/Drupal/Core/Logger/LoggerChannel.php b/core/lib/Drupal/Core/Logger/LoggerChannel.php index ae122ea..979200e 100644 --- a/core/lib/Drupal/Core/Logger/LoggerChannel.php +++ b/core/lib/Drupal/Core/Logger/LoggerChannel.php @@ -59,7 +59,7 @@ public function __construct($channel = 'system') { public function log($level, $message, array $context = array()) { // Merge in defaults. $context += array( - 'type' => $this->channel, + 'channel' => $this->channel, 'link' => '', 'user' => NULL, 'uid' => 0, diff --git a/core/modules/dblog/lib/Drupal/dblog/Logger/DbLog.php b/core/modules/dblog/lib/Drupal/dblog/Logger/DbLog.php index d15bf0a..36b553e 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Logger/DbLog.php +++ b/core/modules/dblog/lib/Drupal/dblog/Logger/DbLog.php @@ -47,7 +47,7 @@ public function log($level, $message, array $context = array()) { ->insert('watchdog') ->fields(array( 'uid' => $context['uid'], - 'type' => substr($context['type'], 0, 64), + 'type' => substr($context['channel'], 0, 64), 'message' => $message, 'variables' => serialize($context['variables']), 'severity' => $level, diff --git a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php index 3039107..abcf5ab 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php +++ b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php @@ -130,7 +130,7 @@ private function generateLogEntries($count, $type = 'custom', $severity = WATCHD // Prepare the fields to be logged $log = array( - 'type' => $type, + 'channel' => $type, 'message' => 'Log entry added to test the dblog row limit.', 'variables' => array(), 'severity' => $severity, @@ -417,7 +417,7 @@ protected function testDBLogAddAndClear() { // Get a count of how many watchdog entries already exist. $count = db_query('SELECT COUNT(*) FROM {watchdog}')->fetchField(); $log = array( - 'type' => 'custom', + 'channel' => 'system', 'message' => 'Log entry added to test the doClearTest clear down.', 'variables' => array(), 'severity' => WATCHDOG_NOTICE, @@ -535,7 +535,7 @@ protected function getLogEntries() { foreach ($table->tbody->tr as $row) { $entries[] = array( 'severity' => $this->getSeverityConstant($row['class']), - 'type' => $this->asText($row->td[1]), + 'channel' => $this->asText($row->td[1]), 'message' => $this->asText($row->td[3]), 'user' => $this->asText($row->td[4]), ); @@ -558,7 +558,7 @@ protected function getTypeCount(array $types) { $count = array_fill(0, count($types), 0); foreach ($entries as $entry) { foreach ($types as $key => $type) { - if ($entry['type'] == $type['type'] && $entry['severity'] == $type['severity']) { + if ($entry['channel'] == $type['type'] && $entry['severity'] == $type['severity']) { $count[$key]++; break; } diff --git a/core/modules/syslog/lib/Drupal/syslog/Logger/SysLog.php b/core/modules/syslog/lib/Drupal/syslog/Logger/SysLog.php index 87dd173..2c19f0a 100644 --- a/core/modules/syslog/lib/Drupal/syslog/Logger/SysLog.php +++ b/core/modules/syslog/lib/Drupal/syslog/Logger/SysLog.php @@ -49,7 +49,7 @@ public function log($level, $message, array $context = array()) { $entry = strtr($this->config->get('format'), array( '!base_url' => $base_url, '!timestamp' => $context['timestamp'], - '!type' => $context['type'], + '!type' => $context['channel'], '!ip' => $context['ip'], '!request_uri' => $context['request_uri'], '!referer' => $context['referer'],