4.6.x bootstrap.inc watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL)
4.7.x bootstrap.inc watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL)
5.x bootstrap.inc watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL)
6.x bootstrap.inc watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)
7.x bootstrap.inc watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)

Log a system message.


$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.

51 calls to watchdog()
aggregator_parse_feed in modules/aggregator/aggregator.module
blogapi_blogger_edit_post in modules/blogapi/blogapi.module
Blogging API callback. Modifies the specified blog node.
blogapi_blogger_new_post in modules/blogapi/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
book_admin_edit_submit in modules/book/book.module
comment_admin_overview_submit in modules/comment/comment.module
Execute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.

... See full list

4 string references to 'watchdog'
default_profile_modules in profiles/default/default.profile
Return an array of the modules to be enabled when this profile is installed.
system_modules in modules/system/system.module
Menu callback; provides module enable/disable interface.
system_update_169 in modules/system/system.install
update_fix_system_table in ./update.php


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


function watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL) {
  global $user, $base_root;
  $current_db = db_set_active();

  // Note: log the exact, entire absolute URL.
  $request_uri = $base_root . request_uri();
  db_query("INSERT INTO {watchdog} (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (%d, '%s', '%s', %d, '%s', '%s', '%s', '%s', %d)", $user->uid, $type, $message, $severity, $link, $request_uri, referer_uri(), $_SERVER['REMOTE_ADDR'], time());
  if ($current_db) {