function dblog_watchdog in Drupal 6
Same name and namespace in other branches
- 7 modules/dblog/dblog.module \dblog_watchdog()
Implementation of hook_watchdog().
File
- modules/
dblog/ dblog.module, line 131 - System monitoring and logging for administrators.
Code
function dblog_watchdog($log = array()) {
$current_db = db_set_active();
db_query("INSERT INTO {watchdog}\n (uid, type, message, variables, severity, link, location, referer, hostname, timestamp)\n VALUES\n (%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);
}
}