You are here

private static function CleanerLogger::isAvailable in Cleaner 8

Check if the specified log level is available.

Parameters

string|null $level: Log level.

Return value

bool Checking result.

1 call to CleanerLogger::isAvailable()
CleanerLogger::log in src/Logger/CleanerLogger.php
Write a log into the database.

File

src/Logger/CleanerLogger.php, line 52

Class

CleanerLogger
Class CleanerLogger.

Namespace

Drupal\cleaner\Logger

Code

private static function isAvailable($level = NULL) {
  return (bool) (!empty($level) && in_array($level, static::$levels));
}