startLog

  1. drupal
    1. drupal7
Versionen
drupal7 final public static Database::startLog($logging_key, $key = 'default')

Start logging a given logging key on the specified connection.

Übergabeparameter

$logging_key The logging key to log.

$key The database connection key for which we want to log.

Rückgabewert

The query log object. Note that the log object does support richer methods than the few exposed through the Database class, so in some cases it may be desirable to access it directly.

See also

DatabaseLog

Verwandte Themen

Code

includes/database/database.inc, line 1148

<?php
final public static function startLog($logging_key, $key = 'default') {
  if (empty(self::$logs[$key])) {
    self::$logs[$key] = new DatabaseLog($key);

    // Every target already active for this connection key needs to have
    // the logging object associated with it.
    if (!empty(self::$connections[$key])) {
      foreach (self::$connections[$key] as $connection) {
        $connection->setLogger(self::$logs[$key]);
      }
    }
  }

  self::$logs[$key]->start($logging_key);
  return self::$logs[$key];
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen