You are here

public function SecurityReview::log in Security Review 8

Logs an event.

Parameters

\Drupal\security_review\Check $check: The Check the message is about.

string $message: The message.

array $context: The context of the message.

int $level: Severity (RfcLogLevel).

1 call to SecurityReview::log()
SecurityReview::logCheckResult in src/SecurityReview.php
Logs a check result.

File

src/SecurityReview.php, line 192

Class

SecurityReview
A class containing static methods regarding the module's configuration.

Namespace

Drupal\security_review

Code

public function log(Check $check, $message, array $context, $level) {
  if (static::isLogging()) {
    $this->moduleHandler
      ->invokeAll('security_review_log', [
      'check' => $check,
      'message' => $message,
      'context' => $context,
      'level' => $level,
    ]);
  }
}