watchdog
includes/bootstrap.inc, строка 819
- Версии
- 5
watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL)
- 6
watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)
Записывает сообщение в системный журнал ошибок.
Параметры
$type
Категория, к которой принадлежит сообщение.
$message
Сообщение. См. синтаксис функции t()
, чтобы понять как взаимодействуют параметры $message
и $variables
.
$variables
Массив заменителей для сообщения или NULL
, если оно уже переведено.
$severity
Важность сообщения (RFC 3164)
$link
Ссылка, ассоциируемая с сообщением.
Смотрите также
Log a system message.
See also
Parameters
$type The category to which this message belongs.
$message The message to store in the log. See t() for documentation on how $message and $variables interact. Keep $message translatable by not concatenating dynamic values into it!
$variables Array of variables to replace in the message on display or NULL if message is already translated or not possible to translate.
$severity The severity of the message, as per RFC 3164
$link A link to associate with the message.
▾ 89 функции вызывают watchdog()
- actions_do in includes/actions.inc
- Выполняет заданный список действий путем выполнения соответствующих коллбэков.
- actions_save in includes/actions.inc
- Сохраняет действие и значения его заданных параметров в базу.
- actions_synchronize in includes/actions.inc
- Синхронизирует действия, переданные из модуля.
- aggregator_form_category_submit in modules/aggregator/aggregator.admin.inc
- Process aggregator_form_category form submissions.
- aggregator_form_feed_submit in modules/aggregator/aggregator.admin.inc
- Process aggregator_form_feed form submissions.
- aggregator_parse_feed in modules/aggregator/aggregator.module
- Parse a feed and store its items.
- aggregator_refresh in modules/aggregator/aggregator.module
- Проверяет фид новостей на наличие новых пунктов.
- blogapi_blogger_edit_post in modules/blogapi/blogapi.module
- Коллбэк Blogging API. Модифицирует указанную ноду блога.
- blogapi_blogger_new_post in modules/blogapi/blogapi.module
- Коллбэк Blogging API. Вставляет новую запись блога как ноду.
- book_admin_edit_submit in modules/book/book.admin.inc
- Handle submission of the book administrative page form.
- comment_admin_overview_submit in modules/comment/comment.admin.inc
- Process comment_admin_overview form submissions.
- comment_save in modules/comment/comment.module
- Сохраняет новый или измененный комментарий.
- comment_unpublish_action in modules/comment/comment.module
- Действие; Снимает комментарий с публикации.
- comment_unpublish_by_keyword_action in modules/comment/comment.module
- Implementation of a configurable Drupal action. Unpublish a comment if it contains a certain string.
- contact_admin_delete_submit in modules/contact/contact.admin.inc
- Process category delete form submission.
- contact_admin_edit_submit in modules/contact/contact.admin.inc
- Process the contact category edit page form submission.
- contact_mail_page_submit in modules/contact/contact.pages.inc
- Process the site-wide contact page form submission.
- contact_mail_user_submit in modules/contact/contact.pages.inc
- Process the personal contact page form submission.
- drupal_access_denied in includes/common.inc
- Генерирует ошибку 403 если для просмотра страницы недостаточно прав.
- drupal_convert_to_utf8 in includes/unicode.inc
- Конвертирует данные в UTF-8.
- drupal_cron_cleanup in includes/common.inc
- Shutdown function for cron cleanup.
- drupal_cron_run in includes/common.inc
- При вызове выполняет задачи cron
- drupal_error_handler in includes/common.inc
- Журналирует ошибки, так, как это указанно администратором.
- drupal_mail in includes/mail.inc
- Отправляет сообщения по e-mail.
- drupal_not_found in includes/common.inc
- Генерирует ошибку 404 (страница не найдена) если запрос не удалось обработать.
- drupal_xml_parser_create in includes/unicode.inc
- Prepare a new XML parser.
- file_check_directory in 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_copy in includes/file.inc
- Копирует файл из одного места в другое. Эта мощная функция работает как расширенная версия функции copy(). Непосредственно перед копированием проверяет правильность $source и $dest и возможность чтения/записи. Копирование файла происходить только если $source и $dest не равны.
- file_save_upload in includes/file.inc
- Сохраняет загруженный файл в новое место. Исходный файл должен быть загружен и обработан.
- filter_form_validate in modules/filter/filter.module
- forum_confirm_delete_submit in modules/forum/forum.admin.inc
- Implementation of forms api _submit call. Deletes a forum after confirmation.
- hook_ping in developer/hooks/core.php
- Отправляет ping-запрос на другой сервер.
- image_toolkit_invoke in includes/image.inc
- Invokes the given method using the currently selected toolkit.
- locale_add_language in includes/locale.inc
- API добавления языка.
- locale_languages_delete_form_submit in includes/locale.inc
- Process language deletion submissions.
- locale_translate_edit_form_validate in includes/locale.inc
- Validate string editing form submissions.
- locale_translate_import_form_submit in includes/locale.inc
- Process the locale import form submission.
- locale_update_js_files in modules/locale/locale.module
- Update JavaScript translation file, if required, and add it to the page.
- menu_delete_menu_confirm_submit in modules/menu/menu.admin.inc
- Delete a custom menu and all items in it.
- menu_item_delete_form_submit in modules/menu/menu.admin.inc
- Process menu delete form submissions.
- node_assign_owner_action in modules/node/node.module
- Implementation of a configurable Drupal action. Assigns ownership of a node to a user.
- node_delete in modules/node/node.module
- Удаляет ноду.
- node_form_submit in modules/node/node.pages.inc
- node_make_sticky_action in modules/node/node.module
- Implementation of a Drupal action. Sets the sticky-at-top-of-list property of a node to 1.
- node_make_unsticky_action in modules/node/node.module
- Implementation of a Drupal action. Sets the sticky-at-top-of-list property of a node to 0.
- node_promote_action in modules/node/node.module
- Реализация Drupal-действий (actions). Устанавливает значение свойства "Помещать на главную" материала равным 1.
- node_publish_action in modules/node/node.module
- Implementation of a Drupal action. Sets the status of a node to 1, meaning published.
- node_revision_delete_confirm_submit in modules/node/node.pages.inc
- node_revision_revert_confirm_submit in modules/node/node.pages.inc
- node_save_action in modules/node/node.module
- Implementation of a Drupal action. Saves a node.
- node_type_delete_confirm_submit in modules/node/content_types.inc
- Process content type delete confirm submissions.
- node_type_form_submit in modules/node/content_types.inc
- Implementation of hook_form_submit().
- node_unpromote_action in modules/node/node.module
- Implementation of a Drupal action. Sets the promote property of a node to 0.
- node_unpublish_action in modules/node/node.module
- Implementation of a Drupal action. Sets the status of a node to 0, meaning unpublished.
- node_unpublish_by_keyword_action in modules/node/node.module
- Implementation of a configurable Drupal action. Unpublish a node if it contains a certain string.
- ping_ping in modules/ping/ping.module
- Implementation of hook_ping().
- profile_field_delete_submit in modules/profile/profile.admin.inc
- Process a field delete form submission.
- profile_field_form_submit in modules/profile/profile.admin.inc
- Process profile_field_form submissions.
- search_view in modules/search/search.pages.inc
- Menu callback; presents the search form and/or search results.
- system_actions_delete_form_submit in modules/system/system.module
- Process system_actions_delete form submissions.
- system_cron in modules/system/system.module
- Реализация hook_cron().
- system_send_email_action in modules/system/system.module
- Implementation of a configurable Drupal action. Sends an email.
- taxonomy_form_term_submit in modules/taxonomy/taxonomy.admin.inc
- Обработчик кнопки "Отправить", формы добавления или обновления термина. См. также taxonomy_form_term()
- taxonomy_form_vocabulary_submit in modules/taxonomy/taxonomy.admin.inc
- Accept the form submission for a vocabulary and save the results.
- taxonomy_term_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to delete a term after confirmation. See alsotaxonomy_term_confirm_delete()
- taxonomy_vocabulary_confirm_delete_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to delete a vocabulary after confirmation. See alsotaxonomy_vocabulary_confirm_delete()
- taxonomy_vocabulary_confirm_reset_alphabetical_submit in modules/taxonomy/taxonomy.admin.inc
- Submit handler to reset a vocabulary to alphabetical order after confirmation. See alsotaxonomy_vocabulary_confirm_reset_alphabetical()
- throttle_exit in modules/throttle/throttle.module
- Implementation of hook_exit().
- trigger_unassign_submit in modules/trigger/trigger.admin.inc
- user_authenticate_finalize in modules/user/user.module
- Finalize the login process. Must be called when logging in a user.
- user_block_ip_action in modules/user/user.module
- Implementation of a Drupal action. Adds an access rule that blocks the user's IP address.
- user_block_user_action in modules/user/user.module
- Implementation of a Drupal action. Blocks the current user.
- user_delete in modules/user/user.module
- Удаляет пользователя.
- user_edit_validate in modules/user/user.pages.inc
- user_external_login_register in modules/user/user.module
- Helper function for authentication modules. Either login in or registers the current user, based on username. Either way, the global $user object is populated based on $name.
- user_login_final_validate in modules/user/user.module
- A validate handler on the login form. Should be the last validator. Sets an error if user has not been authenticated yet.
- user_logout in modules/user/user.pages.inc
- Menu callback; logs the current user out, and redirects to the home page.
- user_pass_reset in modules/user/user.pages.inc
- Menu callback; process one time login link and redirects to the user page on success.
- user_pass_submit in modules/user/user.pages.inc
- user_profile_form_validate in modules/user/user.pages.inc
- Validation function for the user account and profile editing form.
- user_register_submit in modules/user/user.module
- Обработчик формы регистрации пользователя.
- user_user_operations in modules/user/user.module
- Implementation of hook_user_operations().
- _comment_delete_thread in modules/comment/comment.admin.inc
- Perform the actual deletion of a comment and all its replies.
- _form_validate in 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_export_po in includes/locale.inc
- Write a generated PO or POT file to the output.
- _locale_import_po in includes/locale.inc
- Parses Gettext Portable Object file information and inserts into database
- _locale_rebuild_js in includes/locale.inc
- Создает(заменяет) JavaScript-файл перевода для указанного языка.
- _menu_router_build in includes/menu.inc
- Helper function to build the router table based on the data from hook_menu.
- _update_refresh in modules/update/update.fetch.inc
- Fetch project info via XML from a central server.
Код
<?php
function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
global $user, $base_root;
// Prepare the fields to be logged
$log_message = array(
'type' => $type,
'message' => $message,
'variables' => $variables,
'severity' => $severity,
'link' => $link,
'user' => $user,
'request_uri' => $base_root . request_uri(),
'referer' => referer_uri(),
'ip' => ip_address(),
'timestamp' => time(),
);
// Call the logging hooks to log/process the message
foreach (module_implements('watchdog', TRUE) as $module) {
module_invoke($module, 'watchdog', $log_message);
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии