function ultimate_cron_record_log in Ultimate Cron 7
Same name and namespace in other branches
- 8 ultimate_cron.module \ultimate_cron_record_log()
- 6 ultimate_cron.module \ultimate_cron_record_log()
Store watchdog error messages for later use.
@staticvar string $log
Parameters
$msg: Message to record.
$reset: Reset recorded message.
Return value
string Message recorded.
3 calls to ultimate_cron_record_log()
- ultimate_cron_background_process_shutdown in ./
ultimate_cron.module - Implements hook_background_process_shutdown().
- ultimate_cron_watchdog in ./
ultimate_cron.module - Implements hook_watchdog().
- _ultimate_cron_run_hook in ./
ultimate_cron.module - This is the function that is launched into a background process. It runs the cron job and does housekeeping, pre/post execute hooks, etc.
1 string reference to 'ultimate_cron_record_log'
- ultimate_cron_background_process_shutdown in ./
ultimate_cron.module - Implements hook_background_process_shutdown().
File
- ./
ultimate_cron.module, line 1206 - @todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…
Code
function ultimate_cron_record_log($msg = NULL, $reset = FALSE, $severity = -1) {
$log =& drupal_static('ultimate_cron_record_log', array());
if ($reset) {
$log = array();
}
$log += array(
'msg' => '',
'severity' => -1,
);
if ($msg) {
$log['msg'] .= "{$msg}\n";
}
$log['severity'] = $log['severity'] < 0 || $severity >= 0 && $severity < $log['severity'] ? $severity : $log['severity'];
return $log['msg'];
}