You are here

public function RulesLog::checkLog in Rules 7.2

Checks the log and throws an exception if there were any problems.

File

includes/rules.core.inc, line 2727
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesLog
The rules default logging class.

Code

public function checkLog($logLevel = self::WARN) {
  foreach ($this->log as $entry) {
    if ($entry[2] >= $logLevel) {
      throw new Exception($this
        ->render());
    }
  }
}