function features_log in Features 6
Same name and namespace in other branches
- 7.2 features.module \features_log()
- 7 features.module \features_log()
Log a message, environment agnostic.
Parameters
$message: The message to log.
$severity: The severity of the message: status, warning or error.
2 calls to features_log()
- features_export_render in ./
features.export.inc - Render feature export into an array representing its files.
- views_features_export in includes/
features.views.inc - Implementation of hook_features_export().
File
- ./
features.module, line 763 - Module file for the features module, which enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together statisfy a certain use-case.
Code
function features_log($message, $severity = 'status') {
if (function_exists('drush_verify_cli')) {
$message = strip_tags($message);
if ($severity == 'status') {
$severity = 'ok';
}
elseif ($severity == 'error') {
drush_set_error($message);
return;
}
drush_log($message, $severity);
return;
}
drupal_set_message($message, $severity, FALSE);
}