/** * {@inheritdoc} * * @throws InvalidArgumentException */ public function log($levelName, $message, array $context = []) { $record = new Record($this->getChannel(), (string) $message, Level::createFromName($levelName)); $record->setContext($context); $this->applyProcessors($record); foreach ($this->handlers as $handler) { $pass = $handler->handle($record); if (true !== $pass) { break; } } }
/** * @test */ public function toStringMethod() { $level = new Level(); parent::assertSame((string) $level, sprintf('%s (%s)', $level->getName(), $level->getValue())); }