watchdog

Versions
5
watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL)
6 – 7
watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)

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:

  • WATCHDOG_NOTICE
  • WATCHDOG_WARNING
  • WATCHDOG_ERROR

$link A link to associate with the message.

▾ 87 functions call watchdog()

aggregator_form_category_submit in drupal/modules/aggregator/aggregator.module
Process aggregator_form_category form submissions. @todo Add delete confirmation dialog.
aggregator_form_feed_submit in drupal/modules/aggregator/aggregator.module
Process aggregator_form_feed form submissions. @todo Add delete confirmation dialog.
aggregator_parse_feed in drupal/modules/aggregator/aggregator.module
aggregator_refresh in drupal/modules/aggregator/aggregator.module
Checks a news feed for new items.
apachesolr_cron in contributions/apachesolr/apachesolr.module
Implementation of hook_cron().
apachesolr_cron_check_node_table in contributions/apachesolr/apachesolr.index.inc
hook_cron() helper to try to make {apachesolr_search_node} consistent with {node}.
apachesolr_delete_index_confirm_submit in contributions/apachesolr/apachesolr.admin.inc
Submit function for the "Delete the index" confirmation form.
apachesolr_delete_node_from_index in contributions/apachesolr/apachesolr.module
apachesolr_drupal_query in contributions/apachesolr/apachesolr.module
Factory function for query objects.
apachesolr_index_nodes in contributions/apachesolr/apachesolr.module
Function to handle the indexing of nodes.
apachesolr_index_page in contributions/apachesolr/apachesolr.admin.inc
Gets information about the fields already in solr index.
apachesolr_index_report in contributions/apachesolr/apachesolr.admin.inc
apachesolr_mlt_suggestions in contributions/apachesolr/apachesolr.module
Performs a moreLikeThis query using the settings and retrieves documents.
apachesolr_nodeaccess_apachesolr_modify_query in contributions/apachesolr/contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
Implementation of hook_apachesolr_modify_query().
apachesolr_nodeapi_mass_delete in contributions/apachesolr/apachesolr.index.inc
apachesolr_nodeapi_mass_update in contributions/apachesolr/apachesolr.index.inc
apachesolr_requirements in contributions/apachesolr/apachesolr.install
Implementation of hook_requirements().
apachesolr_search_build_spellcheck in contributions/apachesolr/apachesolr_search.module
apachesolr_search_search in contributions/apachesolr/apachesolr_search.module
Implementation of hook_search().
apachesolr_search_settings_page in contributions/apachesolr/apachesolr_search.admin.inc
Menu callback - the settings form.
apachesolr_search_taxonomy_term_page in contributions/apachesolr/apachesolr.taxonomy.inc
Overrides taxonomy/term/X links
apachesolr_search_type_boost_form_submit in contributions/apachesolr/apachesolr_search.admin.inc
Submit callback for apachesolr_search_type_boost_form().
apachesolr_search_view in contributions/apachesolr/apachesolr_search.module
Re-implementation of search_view().
apachesolr_set_stats_message in contributions/apachesolr/apachesolr.module
Call drupal_set_message() with the text.
api_parse_file in contributions/api/parser.inc
Read in the file at the given path and pass it off to the appropriate handler for parsing.
blogapi_blogger_edit_post in drupal/modules/blogapi/blogapi.module
Blogging API callback. Modifies the specified blog node.
blogapi_blogger_new_post in drupal/modules/blogapi/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
book_admin_edit_submit in drupal/modules/book/book.module
comment_admin_overview_submit in drupal/modules/comment/comment.module
Execute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.
comment_save in drupal/modules/comment/comment.module
Accepts a submission of new or changed comment content.
contact_admin_delete_submit in drupal/modules/contact/contact.module
Process category delete form submission.
contact_admin_edit_submit in drupal/modules/contact/contact.module
Process the contact category edit page form submission.
contact_mail_page_submit in drupal/modules/contact/contact.module
Process the site-wide contact page form submission.
contact_mail_user_submit in drupal/modules/contact/contact.module
Process the personal contact page form submission.
drupal_access_denied in drupal/includes/common.inc
Generates a 403 error if the request is not allowed.
drupal_client_ping in drupal/modules/drupal/drupal.module
Callback function from drupal_xmlrpc() called when another site pings this one.
drupal_convert_to_utf8 in drupal/includes/unicode.inc
Convert data to UTF-8
drupal_cron_cleanup in drupal/includes/common.inc
Shutdown function for cron cleanup.
drupal_cron_run in drupal/includes/common.inc
Executes a cron run when called
drupal_notify in drupal/modules/drupal/drupal.module
Sends a ping to the Drupal directory server.
drupal_not_found in drupal/includes/common.inc
Generates a 404 error if the request can not be handled.
drupal_xml_parser_create in drupal/includes/unicode.inc
Prepare a new XML parser.
error_handler in drupal/includes/common.inc
Log errors as defined by administrator Error levels: 0 = Log errors to database. 1 = Log errors to database and to screen.
file_check_directory in drupal/includes/file.inc
Check that the directory exists and is writable. Directories need to have execute permissions to be considered a directory by FTP servers, etc.
file_check_upload in drupal/includes/file.inc
Verify an uploaded file.
file_copy in drupal/includes/file.inc
Copies a file to a new location. This is a powerful function that in many ways performs like an advanced version of copy().
filter_form_validate in drupal/modules/filter/filter.module
forum_confirm_delete_submit in drupal/modules/forum/forum.module
Implementation of forms api _submit call. Deletes a forum after confirmation.
image_toolkit_invoke in drupal/includes/image.inc
Invokes the given method using the currently selected toolkit.
locale_admin_manage_delete_form_submit in drupal/modules/locale/locale.module
Process language deletion submissions.
menu_edit_item_save in drupal/modules/menu/menu.module
Save changes to a menu item into the database.
menu_item_delete_form_submit in drupal/modules/menu/menu.module
Process menu delete form submissions.
node_delete in drupal/modules/node/node.module
Delete a node.
node_form_submit in drupal/modules/node/node.module
node_revision_delete_confirm_submit in drupal/modules/node/node.module
node_revision_revert_confirm_submit in drupal/modules/node/node.module
node_type_delete_confirm_submit in drupal/modules/node/content_types.inc
Process content type delete confirm submissions.
node_type_form_submit in drupal/modules/node/content_types.inc
Implementation of hook_form_submit().
ping_ping in drupal/modules/ping/ping.module
Implementation of hook_ping().
profile_field_delete_submit in drupal/modules/profile/profile.module
Process a field delete form submission.
profile_field_form_submit in drupal/modules/profile/profile.module
Process profile_field_form submissions.
search_view in drupal/modules/search/search.module
Menu callback; presents the search form and/or search results.
system_update_159 in drupal/modules/system/system.install
Retrieve data out of the old_revisions table and put into new revision system.
system_update_169 in drupal/modules/system/system.install
system_update_177 in drupal/modules/system/system.install
taxonomy_form_term_submit in drupal/modules/taxonomy/taxonomy.module
Accept the form submission for a taxonomy term and save the result.
taxonomy_form_vocabulary_submit in drupal/modules/taxonomy/taxonomy.module
Accept the form submission for a vocabulary and save the results.
taxonomy_term_confirm_delete_submit in drupal/modules/taxonomy/taxonomy.module
taxonomy_vocabulary_confirm_delete_submit in drupal/modules/taxonomy/taxonomy.module
throttle_exit in drupal/modules/throttle/throttle.module
Implementation of hook_exit().
user_authenticate in drupal/modules/user/user.module
user_delete in drupal/modules/user/user.module
Delete a user.
user_edit_validate in drupal/modules/user/user.module
user_login_submit in drupal/modules/user/user.module
user_login_validate in drupal/modules/user/user.module
user_logout in drupal/modules/user/user.module
Menu callback; logs the current user out, and redirects to the home page.
user_pass_reset in drupal/modules/user/user.module
Menu callback; process one time login link and redirects to the user page on success.
user_pass_submit in drupal/modules/user/user.module
user_register_submit in drupal/modules/user/user.module
user_user_operations in drupal/modules/user/user.module
Implementation of hook_user_operations().
_comment_delete_thread in drupal/modules/comment/comment.module
_form_validate in drupal/includes/form.inc
Performs validation on form elements. First ensures required fields are completed, #maxlength is not exceeded, and selected options were in the list of options given to the user. Then calls user-defined validators.
_locale_add_language in drupal/includes/locale.inc
Helper function to add a language
_locale_admin_import_submit in drupal/includes/locale.inc
Process the locale import form submission.
_locale_export_po in drupal/includes/locale.inc
Exports a Portable Object (Template) file for a language
_locale_import_po in drupal/includes/locale.inc
Parses Gettext Portable Object file information and inserts into database
_phptemplate_default in drupal/themes/engines/phptemplate/phptemplate.engine
Default callback for PHPTemplate.

Code

drupal/includes/bootstrap.inc, line 748

<?php
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) {
    db_set_active($current_db);
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.