watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)
Esempio di chiamata:
watchdog('il tuo modulo', 'Descrizione',array(), WATCHDOG_INFO);
Parametri
$type: The category to which this message belongs. Can be any string, but the general practice is to use the name of the module calling watchdog().
$message: The message to store in the log. Keep $message translatable by not concatenating dynamic values into it! Variables in the message should be added by using placeholder strings alongside the variables argument to declare the value of the placeholders. See t() for documentation on how $message and $variables interact.
$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;
Tipologia di Log:
- 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.