Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WithLogLevel.php

class WithLogLevel

Defines the log level applied to an exception.

@author Dejan Angelov <angelovdejan@protonmail.com>

Hierarchy

  • class \Symfony\Component\HttpKernel\Attribute\WithLogLevel

Expanded class hierarchy of WithLogLevel

1 file declares its use of WithLogLevel
ErrorListener.php in vendor/symfony/http-kernel/EventListener/ErrorListener.php

File

vendor/symfony/http-kernel/Attribute/WithLogLevel.php, line 21

Namespace

Symfony\Component\HttpKernel\Attribute
View source
final class WithLogLevel {
    
    /**
     * @param LogLevel::* $level The level to use to log the exception
     */
    public function __construct(string $level) {
        if (!\defined('Psr\\Log\\LogLevel::' . strtoupper($this->level))) {
            throw new \InvalidArgumentException(\sprintf('Invalid log level "%s".', $this->level));
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary
WithLogLevel::__construct public function
RSS feed
Powered by Drupal