abstract class LoggerBase in Service Container 7
Same name and namespace in other branches
- 7.2 src/Logger/LoggerBase.php \Drupal\service_container\Logger\LoggerBase
Provides a common base class for loggers to reduce boilerplate code.
Hierarchy
- class \Drupal\service_container\Logger\LoggerBase implements LoggerInterface
Expanded class hierarchy of LoggerBase
File
- src/
Logger/ LoggerBase.php, line 16 - Contains \Drupal\service_container\Logger\LoggerBase.
Namespace
Drupal\service_container\LoggerView source
abstract class LoggerBase implements LoggerInterface {
/**
* {@inheritdoc}
*/
public function emergency($message, array $context = array()) {
return $this
->log(LogLevel::EMERGENCY, $message, $context);
}
/**
* {@inheritdoc}
*/
public function alert($message, array $context = array()) {
return $this
->log(LogLevel::ALERT, $message, $context);
}
/**
* {@inheritdoc}
*/
public function critical($message, array $context = array()) {
return $this
->log(LogLevel::CRITICAL, $message, $context);
}
/**
* {@inheritdoc}
*/
public function error($message, array $context = array()) {
return $this
->log(LogLevel::ERROR, $message, $context);
}
/**
* {@inheritdoc}
*/
public function warning($message, array $context = array()) {
return $this
->log(LogLevel::WARNING, $message, $context);
}
/**
* {@inheritdoc}
*/
public function notice($message, array $context = array()) {
return $this
->log(LogLevel::NOTICE, $message, $context);
}
/**
* {@inheritdoc}
*/
public function info($message, array $context = array()) {
return $this
->log(LogLevel::INFO, $message, $context);
}
/**
* {@inheritdoc}
*/
public function debug($message, array $context = array()) {
return $this
->log(LogLevel::DEBUG, $message, $context);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LoggerBase:: |
public | function |
Action must be taken immediately. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Critical conditions. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Detailed debug information. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
System is unusable. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Runtime errors that do not require immediate action but should typically
be logged and monitored. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Interesting events. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Normal but significant events. Overrides LoggerInterface:: |
|
LoggerBase:: |
public | function |
Exceptional occurrences that are not errors. Overrides LoggerInterface:: |
|
LoggerInterface:: |
public | function | Logs with an arbitrary level. | 3 |