Issue Bug Under Review Orphaned

#104057Singleton instances are not possible for LogWriter

Eike Starkmann 06/11/24, 15:04 updated 04/22/26, 06:56

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);
}

Reviews 1

History 15