Project

General

Profile

Actions

Task #104477

open

Remove the hyphen as prefix for log context data in the DatabaseWriter

Added by Andy Abderhalden 2 days ago. Updated about 3 hours ago.

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #65577: Logging API does not cope with Exceptions properlyClosedMarkus Klein2015-03-06

Actions
Actions #1

Updated by Gerrit Code Review 1 day ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85387

Actions #2

Updated by Mathias Brodala 1 day ago

  • Related to Bug #65577: Logging API does not cope with Exceptions properly added
Actions #3

Updated by Gerrit Code Review about 3 hours ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/85387

Actions

Also available in: Atom PDF