Refactor setup Container for Logger

This commit is contained in:
Art4 2024-12-26 19:11:54 +00:00
parent 8edca631e6
commit 31deac5117

View file

@ -438,7 +438,7 @@ class App
{ {
$this->setupContainerForAddons(); $this->setupContainerForAddons();
$this->container = $this->container->addRule(LoggerInterface::class, ['constructParams' => [LogChannel::WORKER]]); $this->setupContainerForLogger(LogChannel::WORKER);
DI::init($this->container); DI::init($this->container);
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(\Psr\Log\LoggerInterface::class)); \Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(\Psr\Log\LoggerInterface::class));