How to log error message in drupal
问题 How to log our own error messages (for ex: error due to invalid user date entry) which is generated in php program to drupal error log . 回答1: You can use the watchdog function : watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) Quoting the manual, the parameters are : $type The category to which this message belongs. $message The message to store in the log. $variables Array of variables to replace in the message on display or NULL if message is