function Connection::setLogger

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::setLogger()
  2. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::setLogger()
  3. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::setLogger()

Associates a logging object with this connection.

Parameters

\Drupal\Core\Database\Log $logger: The logging object we want to use.

File

core/lib/Drupal/Core/Database/Connection.php, line 774

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function setLogger(Log $logger) {
    $this->logger = $logger;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.