You are here

public function LoggerBase::error in Service Container 7.2

Same name and namespace in other branches
  1. 7 src/Logger/LoggerBase.php \Drupal\service_container\Logger\LoggerBase::error()

Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters

string $message:

array $context:

Return value

null

Overrides LoggerInterface::error

File

src/Logger/LoggerBase.php, line 42
Contains \Drupal\service_container\Logger\LoggerBase.

Class

LoggerBase
Provides a common base class for loggers to reduce boilerplate code.

Namespace

Drupal\service_container\Logger

Code

public function error($message, array $context = array()) {
  return $this
    ->log(LogLevel::ERROR, $message, $context);
}