function _messaging_log in Messaging 6.3
Same name and namespace in other branches
- 6.4 messaging.module \_messaging_log()
- 6 messaging.module \_messaging_log()
- 6.2 messaging.module \_messaging_log()
- 7 messaging_devel/messaging_devel.module \_messaging_log()
Quick logging for debugging and manual queue processing
4 calls to _messaging_log()
- messaging_debug_log in messaging_debug/
messaging_debug.module - Messaging debug logs
- messaging_log in ./
messaging.module - Short hand for info logs
- messaging_log_get in ./
messaging.module - Get logs without formatting
- messaging_log_start in ./
messaging.module - Init logging system so logs are saved from now on
File
- ./
messaging.module, line 1079
Code
function _messaging_log($type, $txt = NULL, $variables = NULL, $severity = WATCHDOG_NOTICE) {
static $enabled = FALSE;
switch ($type) {
case 'info':
case 'debug':
if ($enabled) {
$_SESSION['messaging_log'][] = array(
$type,
$txt,
$variables,
$severity,
);
}
break;
case 'return':
return isset($_SESSION['messaging_log']) ? $_SESSION['messaging_log'] : NULL;
break;
case 'reset':
unset($_SESSION['messaging_log']);
break;
case 'start':
$enabled = TRUE;
break;
case 'stop':
$enabled = FALSE;
break;
}
}