class Logger

Hierarchy

Expanded class hierarchy of Logger

1 file declares its use of Logger
ExceptionListenerTest.php in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/EventListener/ExceptionListenerTest.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Logger.php, line 16

Namespace

Symfony\Component\HttpKernel\Tests
View source
class Logger implements LoggerInterface {
  protected $logs;
  public function __construct() {
    $this
      ->clear();
  }
  public function getLogs($priority = false) {
    return false === $priority ? $this->logs : $this->logs[$priority];
  }
  public function clear() {
    $this->logs = array(
      'emerg' => array(),
      'alert' => array(),
      'crit' => array(),
      'err' => array(),
      'warn' => array(),
      'notice' => array(),
      'info' => array(),
      'debug' => array(),
    );
  }
  public function log($message, $priority) {
    $this->logs[$priority][] = $message;
  }
  public function emerg($message, array $context = array()) {
    $this
      ->log($message, 'emerg');
  }
  public function alert($message, array $context = array()) {
    $this
      ->log($message, 'alert');
  }
  public function crit($message, array $context = array()) {
    $this
      ->log($message, 'crit');
  }
  public function err($message, array $context = array()) {
    $this
      ->log($message, 'err');
  }
  public function warn($message, array $context = array()) {
    $this
      ->log($message, 'warn');
  }
  public function notice($message, array $context = array()) {
    $this
      ->log($message, 'notice');
  }
  public function info($message, array $context = array()) {
    $this
      ->log($message, 'info');
  }
  public function debug($message, array $context = array()) {
    $this
      ->log($message, 'debug');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Logger::$logs protected property
Logger::alert public function @api Overrides LoggerInterface::alert
Logger::clear public function
Logger::crit public function @api Overrides LoggerInterface::crit
Logger::debug public function @api Overrides LoggerInterface::debug
Logger::emerg public function @api Overrides LoggerInterface::emerg
Logger::err public function @api Overrides LoggerInterface::err
Logger::getLogs public function
Logger::info public function @api Overrides LoggerInterface::info
Logger::log public function
Logger::notice public function @api Overrides LoggerInterface::notice
Logger::warn public function @api Overrides LoggerInterface::warn
Logger::__construct public function