You are here

function elysia_cron_debug in Elysia Cron 6.2

Same name and namespace in other branches
  1. 7.2 elysia_cron.module \elysia_cron_debug()

Log a debug in watchdog (do not print an user message) Drush see it in verbose mode

7 calls to elysia_cron_debug()
elysia_cron_internal_execute_channel in ./elysia_cron.module
Internal function to execute all jobs in a channel elysia_cron_lock_env() must be called BEFORE calling this method
elysia_cron_internal_execute_channel_completed in ./elysia_cron.module
Successful termination (after all shutdown hooks invoked by cron functions).
elysia_cron_internal_execute_job in ./elysia_cron.module
Internal function to execute a single job
elysia_cron_run in ./elysia_cron.module
Public function to invoke a complete cron_run
elysia_cron_run_channel in ./elysia_cron.module
Public function to execute all jobs in a channel

... See full list

File

./elysia_cron.module, line 747

Code

function elysia_cron_debug($message, $vars = array(), $type = WATCHDOG_NOTICE) {
  global $elysia_cron_drush;
  if ($type < WATCHDOG_NOTICE || variable_get('elysia_cron_debug_messages', 0)) {
    _dco_watchdog('cron', $message, $vars, $type);
  }
  if (!empty($elysia_cron_drush) && $elysia_cron_drush >= 2 && ($type >= WATCHDOG_NOTICE || !drush_get_option("verbose", false))) {
    if ($type >= WATCHDOG_NOTICE) {
      drush_print(strip_tags(dt($message, $vars)));
    }
    else {
      drush_log(strip_tags(dt($message, $vars)), $type == WATCHDOG_ERROR ? "error" : ($type == WATCHDOG_ERROR ? "warning" : "notice"));
    }
  }
}