Tag: errors

  • Logging in Drupal 7

    Logging in Drupal 7

    In case you need to log errors and other messages  in Drupal 7 use may use it’s watchdog function. Same thing will work for Drupal 6. watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) Example with some data: watchdog(‘Booking’, ‘Sucessfully booked for %persons’, array(‘%persons’ => 5), WATCHDOG_INFO); Some possible severity levels are WATCHDOG_EMERGENCY,…