1 database.inc | final public static Database::getLog($logging_key, $key = 'default') |
Retrieves the queries logged on for given logging key.
This method also ends logging for the specified key. To get the query log to date without ending the logger request the logging object by starting it again (which does nothing to an open log key) and call methods on it as desired.
Parameters
$logging_key: The logging key to log.
$key: The database connection key for which we want to log.
Return value
array: The query log for the specified logging key and connection.
See also
File
- core/
includes/ database/ database.inc, line 1536 - Core systems for the database layer.
Class
- Database
- Primary front-controller for the database system.
Code
final public static function getLog($logging_key, $key = 'default') {
if (empty(self::$logs[$key])) {
return NULL;
}
/* @var DatabaseLog $logger */
$logger = self::$logs[$key];
$queries = $logger->get($logging_key);
$logger->end($logging_key);
return $queries;
}