LegacyLoggerFactory uses Logger as factory

This commit is contained in:
Art4 2025-01-11 21:05:35 +00:00
parent b40db06ef3
commit 0804413c41
6 changed files with 67 additions and 32 deletions

View file

@ -146,10 +146,6 @@ class App
$this->registerErrorHandler();
/** @var LoggerManager */
$loggerManager = $this->container->create(LoggerManager::class);
$loggerManager->changeLogChannel(LogChannel::APP);
$this->requestId = $this->container->create(Request::class)->getRequestId();
$this->auth = $this->container->create(Authentication::class);
$this->config = $this->container->create(IManageConfigValues::class);
@ -251,9 +247,9 @@ class App
private function setupContainerForLogger(string $logChannel): void
{
$this->container->addRule(LoggerInterface::class, [
'constructParams' => [$logChannel],
]);
/** @var LoggerManager */
$loggerManager = $this->container->create(LoggerManager::class);
$loggerManager->changeLogChannel($logChannel);
}
private function setupLegacyServiceLocator(): void