class NaughtyRecursiveLogger in Drupal 8
Same name and namespace in other branches
- 9 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\LoggerView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NaughtyRecursiveLogger:: |
protected | property | ||
NaughtyRecursiveLogger:: |
protected | property | ||
NaughtyRecursiveLogger:: |
public | function | Logs with an arbitrary level. | |
NaughtyRecursiveLogger:: |
public | function |