Issue #720630 by tim.plunkett, kid_icarus, tsphethean: Fix up docs for watchdog, hook_watchdog, and watchdog constants
parent
7d64f9578e
commit
8f9ee9ec68
|
@ -68,32 +68,32 @@ define('WATCHDOG_EMERGENCY', 0);
|
||||||
define('WATCHDOG_ALERT', 1);
|
define('WATCHDOG_ALERT', 1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Critical: critical conditions.
|
* Log message severity -- Critical conditions.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_CRITICAL', 2);
|
define('WATCHDOG_CRITICAL', 2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Error: error conditions.
|
* Log message severity -- Error conditions.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_ERROR', 3);
|
define('WATCHDOG_ERROR', 3);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Warning: warning conditions.
|
* Log message severity -- Warning conditions.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_WARNING', 4);
|
define('WATCHDOG_WARNING', 4);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Notice: normal but significant condition.
|
* Log message severity -- Normal but significant conditions.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_NOTICE', 5);
|
define('WATCHDOG_NOTICE', 5);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Informational: informational messages.
|
* Log message severity -- Informational messages.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_INFO', 6);
|
define('WATCHDOG_INFO', 6);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log message severity -- Debug: debug-level messages.
|
* Log message severity -- Debug-level messages.
|
||||||
*/
|
*/
|
||||||
define('WATCHDOG_DEBUG', 7);
|
define('WATCHDOG_DEBUG', 7);
|
||||||
|
|
||||||
|
@ -1691,8 +1691,16 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia
|
||||||
* NULL if message is already translated or not possible to
|
* NULL if message is already translated or not possible to
|
||||||
* translate.
|
* translate.
|
||||||
* @param $severity
|
* @param $severity
|
||||||
* The severity of the message, as per RFC 3164. Possible values are
|
* The severity of the message; one of the following values as defined in
|
||||||
* WATCHDOG_ERROR, WATCHDOG_WARNING, etc.
|
* @link http://www.faqs.org/rfcs/rfc3164.html RFC 3164: @endlink
|
||||||
|
* - WATCHDOG_EMERGENCY: Emergency, system is unusable.
|
||||||
|
* - WATCHDOG_ALERT: Alert, action must be taken immediately.
|
||||||
|
* - WATCHDOG_CRITICAL: Critical conditions.
|
||||||
|
* - WATCHDOG_ERROR: Error conditions.
|
||||||
|
* - WATCHDOG_WARNING: Warning conditions.
|
||||||
|
* - WATCHDOG_NOTICE: (default) Normal but significant conditions.
|
||||||
|
* - WATCHDOG_INFO: Informational messages.
|
||||||
|
* - WATCHDOG_DEBUG: Debug-level messages.
|
||||||
* @param $link
|
* @param $link
|
||||||
* A link to associate with the message.
|
* A link to associate with the message.
|
||||||
*
|
*
|
||||||
|
|
|
@ -2333,31 +2333,40 @@ function hook_xmlrpc_alter(&$methods) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an event message
|
* Log an event message.
|
||||||
*
|
*
|
||||||
* This hook allows modules to route log events to custom destinations, such as
|
* This hook allows modules to route log events to custom destinations, such as
|
||||||
* SMS, Email, pager, syslog, ...etc.
|
* SMS, Email, pager, syslog, ...etc.
|
||||||
*
|
*
|
||||||
* @param $log_entry
|
* @param $log_entry
|
||||||
* An associative array containing the following keys:
|
* An associative array containing the following keys:
|
||||||
* - type: The type of message for this entry. For contributed modules, this is
|
* - type: The type of message for this entry.
|
||||||
* normally the module name. Do not use 'debug', use severity WATCHDOG_DEBUG instead.
|
* - user: The user object for the user who was logged in when the event
|
||||||
* - user: The user object for the user who was logged in when the event happened.
|
* happened.
|
||||||
* - request_uri: The Request URI for the page the event happened in.
|
* - request_uri: The request URI for the page the event happened in.
|
||||||
* - referer: The page that referred the use to the page where the event occurred.
|
* - referer: The page that referred the user to the page where the event
|
||||||
|
* occurred.
|
||||||
* - ip: The IP address where the request for the page came from.
|
* - ip: The IP address where the request for the page came from.
|
||||||
* - timestamp: The UNIX timestamp of the date/time the event occurred
|
* - timestamp: The UNIX timestamp of the date/time the event occurred.
|
||||||
* - severity: One of the following values as defined in RFC 3164 http://www.faqs.org/rfcs/rfc3164.html
|
* - severity: The severity of the message; one of the following values as
|
||||||
* WATCHDOG_EMERGENCY Emergency: system is unusable
|
* defined in @link http://www.faqs.org/rfcs/rfc3164.html RFC 3164: @endlink
|
||||||
* WATCHDOG_ALERT Alert: action must be taken immediately
|
* - WATCHDOG_EMERGENCY: Emergency, system is unusable.
|
||||||
* WATCHDOG_CRITICAL Critical: critical conditions
|
* - WATCHDOG_ALERT: Alert, action must be taken immediately.
|
||||||
* WATCHDOG_ERROR Error: error conditions
|
* - WATCHDOG_CRITICAL: Critical conditions.
|
||||||
* WATCHDOG_WARNING Warning: warning conditions
|
* - WATCHDOG_ERROR: Error conditions.
|
||||||
* WATCHDOG_NOTICE Notice: normal but significant condition
|
* - WATCHDOG_WARNING: Warning conditions.
|
||||||
* WATCHDOG_INFO Informational: informational messages
|
* - WATCHDOG_NOTICE: Normal but significant conditions.
|
||||||
* WATCHDOG_DEBUG Debug: debug-level messages
|
* - WATCHDOG_INFO: Informational messages.
|
||||||
* - link: an optional link provided by the module that called the watchdog() function.
|
* - WATCHDOG_DEBUG: Debug-level messages.
|
||||||
* - message: The text of the message to be logged.
|
* - link: An optional link provided by the module that called the watchdog()
|
||||||
|
* function.
|
||||||
|
* - message: The text of the message to be logged. Variables in the message
|
||||||
|
* are indicated by using placeholder strings alongside the variables
|
||||||
|
* argument to declare the value of the placeholders. See t() for
|
||||||
|
* documentation on how the message and variable parameters interact.
|
||||||
|
* - variables: An array of variables to be inserted into the message on
|
||||||
|
* display. Will be NULL or missing if a message is already translated or if
|
||||||
|
* the message is not possible to translate.
|
||||||
*/
|
*/
|
||||||
function hook_watchdog(array $log_entry) {
|
function hook_watchdog(array $log_entry) {
|
||||||
global $base_url, $language;
|
global $base_url, $language;
|
||||||
|
|
Loading…
Reference in New Issue