You are here

function rules_show_log in Rules 6

Shows the log and clears it afterwards

1 call to rules_show_log()
rules_invoke_rule_set in rules/rules.module
Invokes configured rules for the given rule set

File

rules/rules.module, line 686
Rules engine module

Code

function rules_show_log() {
  global $_rules_log, $_rules_log_error;
  if (!empty($_rules_log) && (!empty($_rules_log_error) || variable_get('rules_debug', FALSE))) {
    $i = 0;
    $msg = _rules_show_log($i, $_rules_log, $error);
    if ($_rules_log_error) {
      rules_handle_error_msg('An error occured during rule evaluation. It follows the evaluation log: !log', array(
        '!log' => $msg,
      ));
    }
    else {
      drupal_set_message($msg);
    }
    $_rules_log = NULL;
    $_rules_log_error = NULL;
  }
}