Versione Drupal

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:

 

  1.     WATCHDOG_EMERGENCY: Emergency, system is unusable.
  2.     WATCHDOG_ALERT: Alert, action must be taken immediately.
  3.     WATCHDOG_CRITICAL: Critical conditions.
  4.     WATCHDOG_ERROR: Error conditions.
  5.     WATCHDOG_WARNING: Warning conditions.
  6.     WATCHDOG_NOTICE: (default) Normal but significant conditions.
  7.     WATCHDOG_INFO: Informational messages.
  8.     WATCHDOG_DEBUG: Debug-level messages.