public function AcquiaLiftTestLogger::log in Acquia Lift Connector 7
Same name and namespace in other branches
- 7.2 tests/acquia_lift.test_classes.inc \AcquiaLiftTestLogger::log()
File
- tests/
acquia_lift.test_classes.inc, line 300 - Provides test classes for Acquia Lift
Class
Code
public function log($level, $message, array $context = array()) {
foreach ($context as $key => $value) {
if (strpos($message, '{' . $key . '}') !== FALSE) {
$message = str_replace('{' . $key . '}', $value, $message);
}
}
if ($this->output && function_exists('drupal_set_message')) {
drupal_set_message($message, $level);
}
self::$logs[] = array(
'level' => $level,
'message' => $message,
);
}