log to watchdog drupal 7 code example
Example: adding watchdog in drupal 7
watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)
watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL)