function _textimage_diag in Textimage 7.3
Display/log a diagnostic message.
Parameters
string $message: message
int $severity: severity as per watchdog()
string $caller: the calling function
16 calls to _textimage_diag()
- Textimage::buildImage in classes/
Textimage.inc - Build the image via core image_style_create_derivative() function.
- Textimage::getStyledImageClearFileUri in classes/
Textimage.inc - Set URI to a human readable name for the image file, if possible.
- Textimage::process in classes/
Textimage.inc - Process the Textimage, with the required raw text.
- Textimage::styleByName in classes/
Textimage.inc - Set the image style, from the style name.
- TextimageFonts::setHandler in classes/
TextimageFonts.inc - Set font handler.
File
- ./
textimage.module, line 1045 - Textimage - Provides text to image manipulations.
Code
function _textimage_diag($message, $severity, $caller = NULL, $user_messages = TRUE) {
if ($caller) {
$message = t("@message - Function: @caller", array(
'@message' => $message,
'@caller' => $caller,
));
}
if ($severity <= WATCHDOG_NOTICE) {
watchdog('textimage', $message, array(), $severity);
}
if ($severity <= variable_get('textimage_message_level', WATCHDOG_WARNING) && $user_messages) {
switch ($severity) {
case WATCHDOG_DEBUG:
case WATCHDOG_INFO:
case WATCHDOG_NOTICE:
$type = 'status';
break;
case WATCHDOG_WARNING:
$type = 'warning';
break;
default:
$type = 'error';
}
drupal_set_message($message, $type, FALSE);
}
}