diff --git a/core/lib/Drupal/Core/Logger/LoggerChannel.php b/core/lib/Drupal/Core/Logger/LoggerChannel.php index aae1d1e..3cc64e7 100644 --- a/core/lib/Drupal/Core/Logger/LoggerChannel.php +++ b/core/lib/Drupal/Core/Logger/LoggerChannel.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Logger; -use Drupal\Core\Session\AccountProxyInterface; +use Drupal\Core\Session\AccountInterface; use Psr\Log\LoggerInterface; use Psr\Log\LoggerTrait; use Psr\Log\LogLevel; @@ -90,9 +90,7 @@ public function log($level, $message, array $context = array()) { 'timestamp' => time(), ); if ($this->currentUser) { - // Only pass the account object to the loggers, because some of them (eg - // dblog) store those info. - $context['user'] = $this->currentUser->getAccount(); + $context['user'] = $this->currentUser; $context['uid'] = $this->currentUser->id(); } // Some context values are only available when in a request context. @@ -122,7 +120,7 @@ public function setRequest(Request $request = NULL) { /** * {@inheritdoc} */ - public function setCurrentUser(AccountProxyInterface $current_user = NULL) { + public function setCurrentUser(AccountInterface $current_user = NULL) { $this->currentUser = $current_user; } diff --git a/core/lib/Drupal/Core/Logger/LoggerChannelInterface.php b/core/lib/Drupal/Core/Logger/LoggerChannelInterface.php index 30acd29..15d9741 100644 --- a/core/lib/Drupal/Core/Logger/LoggerChannelInterface.php +++ b/core/lib/Drupal/Core/Logger/LoggerChannelInterface.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Logger; -use Drupal\Core\Session\AccountProxyInterface; +use Drupal\Core\Session\AccountInterface; use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Request; @@ -30,7 +30,7 @@ public function setRequest(Request $request = NULL); * @param \Drupal\Core\Session\AccountInterface|null $current_user * The current user object. */ - public function setCurrentUser(AccountProxyInterface $current_user = NULL); + public function setCurrentUser(AccountInterface $current_user = NULL); /** * Sets the loggers for this channel. diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php index 19f417f..5f9f644 100644 --- a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php +++ b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php @@ -333,7 +333,7 @@ public static function finishBatch($success, $results, $operations) { if (!empty($results['errors'])) { foreach ($results['errors'] as $error) { drupal_set_message($error, 'error'); - watchdog('config_sync', $error, NULL, WATCHDOG_ERROR); + watchdog('config_sync', $error, array(), WATCHDOG_ERROR); } drupal_set_message(\Drupal::translation()->translate('The configuration was imported with errors.'), 'warning'); }