diff --git a/Classes/Config/LogLevel.php b/Classes/Config/LogLevel.php index cd63b76..8c0d408 100644 --- a/Classes/Config/LogLevel.php +++ b/Classes/Config/LogLevel.php @@ -24,6 +24,11 @@ namespace mteu\StreamWriter\Config; /** + * LogLevel. + * + * @author Martin Adler + * @license GPL-3.0-or-later + * * @codeCoverageIgnore */ enum LogLevel: string diff --git a/Classes/Exception/InvalidLogWriterOptionException.php b/Classes/Exception/InvalidLogWriterOptionException.php index 2267ddd..d050504 100644 --- a/Classes/Exception/InvalidLogWriterOptionException.php +++ b/Classes/Exception/InvalidLogWriterOptionException.php @@ -24,7 +24,7 @@ namespace mteu\StreamWriter\Exception; /** - * InvalidOptionException. + * InvalidLogWriterOptionException. * * @author Martin Adler * @license GPL-3.0-or-later diff --git a/Classes/Writer/StreamWriter.php b/Classes/Writer/StreamWriter.php index 4df4659..1a476dc 100644 --- a/Classes/Writer/StreamWriter.php +++ b/Classes/Writer/StreamWriter.php @@ -26,6 +26,7 @@ use mteu\StreamWriter\Config\LogLevel; use mteu\StreamWriter\Config\StandardStream; use mteu\StreamWriter\Exception\InvalidLogWriterConfigurationException; +use mteu\StreamWriter\Exception\InvalidLogWriterOptionException; use TYPO3\CMS\Core\Log\LogRecord; use TYPO3\CMS\Core\Log\Writer\AbstractWriter; use TYPO3\CMS\Core\Log\Writer\WriterInterface; @@ -57,7 +58,7 @@ final class StreamWriter extends AbstractWriter /** * @param array{outputStream: StandardStream} $options - * @throws InvalidLogWriterConfigurationException + * @throws InvalidLogWriterConfigurationException|\TYPO3\CMS\Core\Log\Exception\InvalidLogWriterConfigurationException */ public function __construct(array $options = ['outputStream' => StandardStream::Error]) { @@ -70,7 +71,7 @@ public function __construct(array $options = ['outputStream' => StandardStream:: /** * @return LogLevel|StandardStream|class-string[] - * @throws InvalidLogWriterConfigurationException + * @throws InvalidLogWriterOptionException */ public function getOption(string $option): array|LogLevel|StandardStream { @@ -78,7 +79,7 @@ public function getOption(string $option): array|LogLevel|StandardStream 'outputStream' => $this->outputStream, 'maxLevel' => $this->maxLevel, 'ignoredComponents' => $this->ignoredComponents, - default => throw new InvalidLogWriterConfigurationException( + default => throw new InvalidLogWriterOptionException( 'Option ' . $option . ' does not exist.', 1726173519 ),