/** * @param LoggerInterface $logger * @param string $level \Psr\Log\LogLevel string */ public function __construct(LoggerInterface $logger, $level) { parent::__construct($logger, $level); $this->logLevel = array_search($level, self::$levels, true); if ($this->logLevel === false) { throw new InvalidArgumentException(sprintf('Cannot use logging level "%s"', $level)); } }
/** * @param LoggerInterface $logger * @param array $decorations */ public function __construct(LoggerInterface $logger, array $decorations) { parent::__construct($logger, $decorations); $this->decorations = $decorations; }