fromName example

/** * {@inheritdoc} */
    public function handle(LogRecord $record): bool
    {
        if (
            isset($record->context['exception'])
            && \is_object($record->context['exception'])
            && $record->context['exception'] instanceof ShopwareHttpException
            && \array_key_exists($record->context['exception']->getErrorCode()$this->errorCodesToLogLevel)
        ) {
            $level = Level::fromName($this->errorCodesToLogLevel[$record->context['exception']->getErrorCode()]);

            $record = new LogRecord(
                $record->datetime,
                $record->channel,
                $level,
                $record->message,
                $record->context,
                $record->extra,
                $record->formatted
            );
        }

        
Home | Imprint | This part of the site doesn't use cookies.