Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function __construct( |
||
29 | protected readonly Container $container, |
||
30 | protected readonly HandlerConfigurationInterface $handlerConfiguration, |
||
31 | protected readonly LoggerProviderTypeConfigurationInterface $loggerProviderTypeConfiguration |
||
32 | ) { |
||
33 | $levelName = mb_strtoupper($loggerProviderTypeConfiguration->getLogLevel()->level()); |
||
34 | |||
35 | if (!\in_array($levelName, Level::NAMES, true)) { |
||
|
|||
36 | throw new \RuntimeException(sprintf('Invalid log level `%s` for the logger name `%s`.', $levelName, $this->loggerProviderTypeConfiguration->getLoggerName())); |
||
37 | } |
||
38 | |||
39 | $monoLevel = Level::fromName($levelName); |
||
40 | |||
41 | parent::__construct($monoLevel); |
||
42 | |||
43 | $this->configure(); |
||
44 | } |
||
50 |