You are here

public static function CleanerLogger::log in Cleaner 8

Write a log into the database.

Parameters

string $level: Log level.

string $message: Log message text.

File

src/Logger/CleanerLogger.php, line 37

Class

CleanerLogger
Class CleanerLogger.

Namespace

Drupal\cleaner\Logger

Code

public static function log($level, $message) {
  if (!empty($message) && static::isAvailable($level)) {
    \Drupal::logger('cleaner')
      ->log($level, $message);
  }
}