dblog_watchdog

Versions
6
dblog_watchdog($log = array())
7
dblog_watchdog(array $log_entry)

Code

modules/dblog/dblog.module, line 128

<?php
function dblog_watchdog($log = array()) {
  $current_db = db_set_active();
  db_query("INSERT INTO {watchdog}
    (uid, type, message, variables, severity, link, location, referer, hostname, timestamp)
    VALUES
    (%d, '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', %d)",
    $log['user']->uid,
    $log['type'],
    $log['message'],
    serialize($log['variables']),
    $log['severity'],
    $log['link'],
    $log['request_uri'],
    $log['referer'],
    $log['ip'],
    $log['timestamp']);

  if ($current_db) {
    db_set_active($current_db);
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.