You are here

class NaughtyRecursiveLogger in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php \Drupal\Tests\Core\Logger\NaughtyRecursiveLogger

Hierarchy

  • class \Drupal\Tests\Core\Logger\NaughtyRecursiveLogger implements \Psr\Log\LoggerInterface uses \Psr\Log\LoggerTrait

Expanded class hierarchy of NaughtyRecursiveLogger

File

core/tests/Drupal/Tests/Core/Logger/LoggerChannelTest.php, line 152
Contains \Drupal\Tests\Core\Logger\LoggerChannelTest.

Namespace

Drupal\Tests\Core\Logger
View source
class NaughtyRecursiveLogger implements LoggerInterface {
  use LoggerTrait;
  protected $channel;
  protected $message;
  public function __construct(LoggerChannel $channel) {
    $this->channel = $channel;
  }
  public function log($level, $message, array $context = []) {
    $this->channel
      ->log(rand(0, 7), $message, $context);
  }

}

Members