function watchdog_skip_semaphore
Replacement of the watchdog() function that eliminates the use of semaphores so that we can test the abortion of an action loop.
2 calls to watchdog_skip_semaphore()
- actions_loop_test_init in modules/
simpletest/ tests/ actions_loop_test.module - Implements hook_init().
- actions_loop_test_log in modules/
simpletest/ tests/ actions_loop_test.module - Write a message to the log.
File
-
modules/
simpletest/ tests/ actions_loop_test.module, line 73
Code
function watchdog_skip_semaphore($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
global $user, $base_root;
// Prepare the fields to be logged
$log_entry = array(
'type' => $type,
'message' => $message,
'variables' => $variables,
'severity' => $severity,
'link' => $link,
'user' => $user,
'uid' => isset($user->uid) ? $user->uid : 0,
'request_uri' => $base_root . request_uri(),
'referer' => $_SERVER['HTTP_REFERER'],
'ip' => ip_address(),
'timestamp' => REQUEST_TIME,
);
// Call the logging hooks to log/process the message
foreach (module_implements('watchdog') as $module) {
module_invoke($module, 'watchdog', $log_entry);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.