Project

General

Profile

Actions

Bug #104057

open

Singleton instances are not possible for LogWriter

Added by Eike Starkmann about 1 month ago. Updated about 1 month ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
AdminPanel
Target version:
-
Start date:
2024-06-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This leads to the InMemoryLogWriter of the admin panel to be instaciated as new class. Therefor all the logs will not be shown, because they got written in another instance.

The problem lies in the LogManager and GeneralUtiliy:makeInstance

The line $logWriter = GeneralUtility::makeInstance($logWriterClassName, $logWriterOptions); when $logWriterOptions=[]

Then GeneralUtiliy:makeInstance will not get the container:

if (self::$container !== null && $constructorArguments === [] && self::$container->has($className)) {
            return self::$container->get($className);
}
Actions #1

Updated by Eike Starkmann about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Gerrit Code Review about 1 month 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/+/84620

Actions #3

Updated by Gerrit Code Review about 1 month 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/+/84620

Actions

Also available in: Atom PDF