{
$this->setupContainerForAddons();
+ $this->setupContainerForLogger(LogChannel::DEFAULT);
+
$this->container = $this->container->addRule(Mode::class, [
'call' => [
['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL],
{
$this->setupContainerForAddons();
- $this->container = $this->container->addRule(LoggerInterface::class,[
- 'constructParams' => [LogChannel::AUTH_JABBERED],
- ]);
+ $this->setupContainerForLogger(LogChannel::AUTH_JABBERED);
$this->setupLegacyServerLocator();
{
$this->setupContainerForAddons();
- $this->container = $this->container->addRule(LoggerInterface::class, [
- 'constructParams' => [LogChannel::CONSOLE],
- ]);
+ $this->setupContainerForLogger(LogChannel::CONSOLE);
$this->setupLegacyServerLocator();
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
}
+ private function setupContainerForLogger(string $logChannel): void
+ {
+ $this->container = $this->container->addRule(LoggerInterface::class, [
+ 'constructParams' => [$logChannel],
+ ]);
+ }
+
private function setupLegacyServerLocator(): void
{
\Friendica\DI::init($this->container);