mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-23 23:27:47 +09:00
Updates to vendors etc
This commit is contained in:
@@ -14,18 +14,20 @@ namespace Symfony\Component\HttpKernel\Attribute;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
/**
|
||||
* Defines the log level applied to an exception.
|
||||
*
|
||||
* @author Dejan Angelov <angelovdejan@protonmail.com>
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS)]
|
||||
final class WithLogLevel
|
||||
{
|
||||
/**
|
||||
* @param LogLevel::* $level
|
||||
* @param LogLevel::* $level The level to use to log the exception
|
||||
*/
|
||||
public function __construct(public readonly string $level)
|
||||
{
|
||||
if (!\defined('Psr\Log\LogLevel::'.strtoupper($this->level))) {
|
||||
throw new \InvalidArgumentException(sprintf('Invalid log level "%s".', $this->level));
|
||||
throw new \InvalidArgumentException(\sprintf('Invalid log level "%s".', $this->level));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user