You are here

function features_log in Features 7

Same name and namespace in other branches
  1. 6 features.module \features_log()
  2. 7.2 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.

1 call to features_log()
features_export_render in ./features.export.inc
Render feature export into an array representing its files.

File

./features.module, line 916
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);
}