You are here

public function Log::clear in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/Log.php \Drupal\Core\Database\Log::clear()
  2. 9 core/lib/Drupal/Core/Database/Log.php \Drupal\Core\Database\Log::clear()

Empty the query log for the specified logging key.

This method does not stop logging, it simply clears the log. To stop logging, use the end() method.

Parameters

$logging_key: The logging key to empty.

File

core/lib/Drupal/Core/Database/Log.php, line 89

Class

Log
Database query logger.

Namespace

Drupal\Core\Database

Code

public function clear($logging_key) {
  $this->queryLog[$logging_key] = [];
}