Same name and namespace in other branches
  1. 4.7.x includes/bootstrap.inc \watchdog()
  2. 5.x includes/bootstrap.inc \watchdog()
  3. 6.x includes/bootstrap.inc \watchdog()
  4. 7.x includes/bootstrap.inc \watchdog()

Log a system message.

Parameters

$type: The category to which this message belongs.

$message: The message to store in the log.

$severity: The severity of the message. One of the following values:

$link: A link to associate with the message.

30 calls to watchdog()
aggregator_parse_feed in modules/aggregator.module
blogapi_blogger_edit_post in modules/blogapi.module
Blogging API callback. Modifies the specified blog node.
blogapi_blogger_new_post in modules/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
book_admin_save in modules/book.module
comment_post in modules/comment.module

... See full list

2 string references to 'watchdog'
module_list in includes/module.inc
Collect a list of all loaded modules. During the bootstrap, return only vital modules. See bootstrap.inc
system_module_listing in modules/system.module
Generate a list of all the available modules, as well as update the system list.

File

includes/bootstrap.inc, line 584
Functions that need to be loaded on every Drupal request.

Code

function watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL) {
  global $user;
  db_query("INSERT INTO {watchdog} (uid, type, message, severity, link, location, hostname, timestamp) VALUES (%d, '%s', '%s', %d, '%s', '%s', '%s', %d)", $user->uid, $type, $message, $severity, $link, request_uri(), $_SERVER['REMOTE_ADDR'], time());
}