You are here

function ultimate_cron_watchdog_message in Ultimate Cron 7.2

Log message either to watchdog or to screen.

Parameters

string $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().

string $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.

array $variables: Array of variables to replace in the message on display or NULL if message is already translated or not possible to translate.

int $severity: The severity of the message; one of the following values as defined in RFC 3164:

string $status: The message's type. supported:

  • 'status'
  • 'warning'
  • 'error'

bool $set_message: Use drupal_set_message() instead of watchdog logging.

1 call to ultimate_cron_watchdog_message()
ultimate_cron_run_scheduled in ./ultimate_cron.module
Run scheduled jobs.

File

./ultimate_cron.module, line 1690

Code

function ultimate_cron_watchdog_message($type, $message, $variables, $severity, $status, $set_message) {
  if ($set_message) {
    drupal_set_message(t($message, $variables), $status);
  }
  else {
    watchdog($type, $message, $variables, $severity);
  }
}