Actions
Task #104477
openRemove the hyphen as prefix for log context data in the DatabaseWriter
Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2024-07-25
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
According to PSR-3, additional "context" data can be logged as an array, which is converted to json by the DatabaseWriter.
The DatabaseWriter adds a "-" prefix to each json string that is persisted.
The same thing happens in the FileWriter for better log parsing (I think?), but it doesn't make sense in the DatabaseWriter because the context data is persisted in a separate column.
I suggest removing the hyphen from line 82. It will then be easier to interpolate the context data in custom "logviewer" applications.
https://github.com/TYPO3/typo3/blob/12.4/typo3/sysext/core/Classes/Log/Writer/DatabaseWriter.php
Actions