function _messaging_devel_log_text in Messaging 7
Format message as loggable text
3 calls to _messaging_devel_log_text()
- messaging_devel_block in messaging_devel/
messaging_devel.module - Implementation of hook_block()
- messaging_devel_devlog_msg in messaging_devel/
messaging_devel.module - Message processor, just log incoming messages
- messaging_devel_watchdog_msg in messaging_devel/
messaging_devel.module - Messaging processor
File
- messaging_devel/
messaging_devel.module, line 235 - Simple messaging using html page. Messaging method plug-in
Code
function _messaging_devel_log_text($message) {
$source = $message->source;
$variables = array(
'%subject' => $message->subject,
);
if ($source['type'] == 'incoming') {
$text = 'Incoming message, method %method, channel %channel: %subject';
$variables += array(
'%method' => $source['method'],
'%channel' => $source['channel'],
);
}
elseif ($source['type'] == 'outgoing') {
$text = 'Outgoing message, method %method: %subject';
$variables += array(
'%method' => $message->method,
);
}
else {
$text = 'Unknown message type, full dump: %message';
$variables['%message'] = print_r($message, TRUE);
}
return array(
$text,
$variables,
);
}