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

Added by Steffen Müller over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Logging API
Start date:
2013-06-05
Due date:
% Done:

100%

TYPO3 Version:
6.2

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.

History

#1 Updated by Helmut Hummel over 4 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

#2 Updated by Steffen Müller over 4 years ago

  • Status changed from New to Closed

no action needed.

#3 Updated by Steffen Müller over 4 years ago

  • % Done changed from 0 to 100

Also available in: Atom PDF