You are here

function rules_log in Rules 6

Same name and namespace in other branches
  1. 7.2 rules.module \rules_log()

Writes the message into the log

17 calls to rules_log()
rules_action_invoke_set in rules/modules/rules.rules.inc
Base action implementation for invoking all rule sets.
rules_action_user_create in rules/modules/user.rules.inc
Action: Creates a user.
rules_data_type_date::check_value in rules/modules/rules.rules.inc
Checks the value of your data type. E.g. the number data type uses this to make sure the value is a number.
rules_error_missing_implementation in rules/rules.module
Shows an error message, that a module is missing.
rules_execute_action in rules/rules.module
Execution handler for actions

... See full list

File

rules/rules.module, line 496
Rules engine module

Code

function rules_log($message, $error = FALSE) {
  global $_rules_log, $_rules_log_error;
  if (isset($_rules_log)) {
    list($usec, $sec) = explode(" ", microtime());
    $_rules_log[] = array(
      'time' => array(
        'sec' => $sec,
        'usec' => $usec,
      ),
      'msg' => $message,
      'error' => $error,
    );
    $_rules_log_error = !empty($_rules_log_error) || $error;
  }
}