Task #48879
Story #48874: As a developer I want a PSR-3 compatible Logging API
PSR-3: Validate reserved array key "exception" in LogRecord->data
100%
Description
PSR-3 expects the value type of \TYPO3\CMS\Core\Log\LogRecord->data['exception'] to be of PHP Exception.
Solution is to validate the given value for LogRecord->data['exception'] and throw an uncatched InvalidArgumentException if the value is not of type \Exception.
Updated by Helmut Hummel about 9 years ago
Steffen Müller wrote:
PSR-3 expects the value type of \TYPO3\CMS\Core\Log\LogRecord->data['exception'] to be of PHP Exception.
Solution is to validate the given value for LogRecord->data['exception'] and throw an uncatched InvalidArgumentException if the value is not of type \Exception.
Implementors MUST still verify that the 'exception' key is actually an Exception before using it as such, as it MAY contain anything.
This means, fo compliance we do not need to do anything unless we implement a Writer or Processor which evaluates this key as exception