public function TestLogger::log in Search API Saved Searches 8
Overrides RfcLoggerTrait::log
File
- tests/
src/ Kernel/ TestLogger.php, line 21
Class
- TestLogger
- Provides a logger that throws exceptions when logging errors.
Namespace
Drupal\Tests\search_api_saved_searches\KernelCode
public function log($level, $message, array $context = []) {
if ($level < RfcLogLevel::INFO) {
$message = strtr($message, $context);
throw new \Exception($message);
}
}